Most Popular
1500 questions
84
votes
4 answers
What could DUP mean when using ping?
What could DUP mean when using ping?

LanceBaynes
- 40,135
- 97
- 255
- 351
84
votes
12 answers
Split pages in pdf
I have a scanned PDF file in which two different real pages appear together on one virtual page.
The resolution is with good quality. The problem is I have to zoom when reading and drag from left to the right.
Is there some command (convert, pdftk,…

xralf
- 15,415
84
votes
5 answers
How can I tell whether a package is installed via yum in a bash script?
I am trying to write a script that installs packages, but if it fails at any point later in the script rolls back whatever it installed. Of course if the user has already previously installed a package I don't want to uninstall it out from under…

Doktor J
- 2,622
84
votes
2 answers
Why is bash not storing commands that start with spaces?
If I perform a sequence of commands like:
$ ls
$ grep abc file.txt
and then use the up arrow key to get the previous one, the terminal will show the last cmd (which is the grep here)
But if I do something like this:
$ ls
$ grep abc…

sandyp
- 1,177
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,866
84
votes
2 answers
How to recover files I deleted now by running rm *?
By mistake I ran rm * on the current directory where I created many c program files. I had been working on these since morning. Now I can't take out again the time that I spent since morning on creating the files. Please say how to recover. They…

Ravi
- 3,823
83
votes
4 answers
Default exit code when process is terminated?
When a process is killed with a handle-able signal like SIGINT or SIGTERM but it does not handle the signal, what will be the exit code of the process?
What about for unhandle-able signals like SIGKILL?
From what I can tell, killing a process with…

Cory Klein
- 18,911
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
83
votes
2 answers
Command line: <<< instead of <<
Why is the command md5sum <<< 'ddd'
(output: d6d88f2e50080b9602da53dac1102762 -)
right, and md5sum << 'ddd' not?
What does <<< mean?

Jean Paulus
- 831
83
votes
16 answers
How to check progress of running cp?
Is it possible to check the progress of running cp process? Some processes respond to various KILL signals so that you can check what is their status. I know that I can run cp with parameter -v but what if forgot to do that, cp is running for a very…

Petr
- 1,711
83
votes
2 answers
How do I assign a value to a BASH variable if that variable is null/unassigned/falsey?
I'm looking for the equivalent to this JS assignment:
FOO = FOO || "I must have been falsey!";

Magnus
- 1,002
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,240
83
votes
3 answers
Is $() a subshell?
I understand the subshell syntax to be (), is $() just a subshell that you can retrieve variable values from?
Note: This applies to bash 4.4 based on different wording in their documentation.

leeand00
- 4,615
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
- 13
83
votes
5 answers
Argument list too long for ls
I get the following error when trying to ls *.txt | wc -l a directory that contains many files:
-bash: /bin/ls: Argument list too long
Does the threshold of this "Argument list" dependent on distro or computer's spec? Usually, I'd pipe the result…
user19016