Most Popular
1500 questions
84
votes
5 answers
Merge two video clips into one, placing them next to each other
I have two video clips. Both are 640x480 and last 10 minutes. One contains background audio, the other one a singing actor. I would like to create a single 10 minute video clip measuring 1280x480 (in other words, I want to place the videos next to…
user
- 915
- 7
- 27
- 38
84
votes
4 answers
How to change systemd service timeout value?
In the company I am working now there is a legacy service and its init script is using old SysvInit, but is running over systemd (CentOS 7).
Because there's a lot of computation, this service takes around 70 seconds to finish. I didn't configure…
Caesar Ralf
- 1,063
- 1
- 8
- 10
84
votes
2 answers
Grep 'OR' regex problem
I am trying to use grep with a regex to find lines in a file that match 1 of 2 possible strings. Here is my grep:
$ grep "^ID.*(ETS|FBS)" my_file.txt
The above grep returns no results. However if I execute either:
$ grep "^ID.*ETS" my_file.txt …
dr.bunsen
- 1,759
- 3
- 14
- 11
84
votes
2 answers
Can I get individual man pages for the bash builtin commands?
Is there anywhere you can download a manpage for every builtin commands?
I know you can just use help or man bash and search to find info about it, but I want them separated, so I can just do man read and get the read manpage.
Tyilo
- 5,891
- 12
- 47
- 61
84
votes
7 answers
Determining if a file is a hard link or symbolic link?
I'm creating a shell script that would take a filename/path to a file and determine if the file is a symbolic link or a hard link.
The only thing is, I don't know how to see if they are a hard link. I created 2 files, one a hard link and one a…
k-Rocker
- 1,375
- 2
- 12
- 9
84
votes
15 answers
What are the legitimate uses of the `touch` command?
What's the point of the touch command? I know I can create empty files with it, but so is also the case with echo -n.
Otherwise, why would someone need to change the timestamps of a file? Unless to create the false impression about the age of a…
Quora Feans
- 3,806
- 7
- 29
- 46
83
votes
10 answers
Disable screen blanking on text console
I'm running linux clusters, mostly on SLES10. The servers are mostly blades, accessed via remote console. There is a real console in the server room, but switched off.
I would like to disable the screen blanking as it serves no purpose and is…
markus_b
- 1,091
- 1
- 8
- 11
83
votes
6 answers
Which file compression software for Linux offers the highest size reduction for source code?
I do a ton of file compression. Most of the stuff I am compressing is just code, so I need to use lossless compression.
I wondered if there was anything that offers a better size reduction than 7zip. It doesn't matter how long it takes to compress…
Zach
- 961
- 1
- 7
- 5
83
votes
3 answers
How do I start a Cron job 1 min after @reboot?
I need my script to be executed a minute after each reboot. When I apply @reboot in my crontab it is too early for my script - I want the script to be executed after all other tasks that are routinely run on reboot. How might I run the script…
Yurij73
- 1,922
- 6
- 20
- 32
83
votes
2 answers
Why does '/' have an '..' entry?
This has always puzzled me. Why does the root directory contain a reference to a parent directory?
bob@bob:/$ ls -a
. build home lib32 mnt .rpmdb sys vmlinuz
.. cdrom initrd.img lib64 opt sbin tmp …
Nathan Osman
- 6,170
- 10
- 40
- 51
83
votes
2 answers
Clear / erase a mistyped invisible password on a shell / terminal in Linux
One thing that annoys me using Linux's terminal is when I have to type a invisble password, like when you run ssh. Sometimes I mistype one or more letters and then I have to press backspace key a few times to make sure that I erased everything to…
StackUnder
- 955
- 1
- 8
- 9
83
votes
15 answers
How to grep a specific line _and_ the first line of a file?
Assuming a simple grep such as:
$ psa aux | grep someApp
1000 11634 51.2 0.1 32824 9112 pts/1 SN+ 13:24 7:49 someApp
This provides much information, but as the first line of the ps command is missing there is no context for the info. I…
dotancohen
- 15,494
- 26
- 80
- 116
83
votes
3 answers
Tmux, change window pane by mouse click
Is it possible to use the mouse to navigate between different window panes which are split vertically or horizontally?
daisy
- 53,527
- 78
- 236
- 383
83
votes
7 answers
how to redirect output to multiple log files
How to redirect standard output to multiple log files?
The following does not work:
some_command 1> output_log_1 output_log_2 2>&1
doubledecker
- 1,807
- 3
- 15
- 12
83
votes
4 answers
What is the purpose of -e in sed command?
I can't find any documentation about the sed -e switch, for simple replace, do I need it?
e.g.
sed 's/foo/bar/'
VS
sed -e 's/foo/bar/'
Howard
- 977
- 2
- 7
- 5