Most Popular
1500 questions
81
votes
11 answers
A stop job is running for Session c2 of user
The following message appears almost every time I shutdown my computer:
A stop job is running for Session c2 of user ... (1min 30s)
It waits for 1min30s then continues the shutdown process. I follow this systemd shutdown diagnosis guide and get the…
dmn
- 955
- 1
- 10
- 14
81
votes
12 answers
Why do I have to use sudo for almost everything?
If I understand the Linux philosophy correctly, sudo should be used sparingly, and most operations should be performed as an under-privileged user. But that doesn't seem to make sense, since I'm always having to input sudo, whether I'm managing…
user139248
- 835
- 1
- 6
- 3
81
votes
7 answers
How can I get bash to exit on backtick failure in a similar way to pipefail?
So I like to harden my bash scripts wherever I can (and when not able to delegate to a language like Python/Ruby) to ensure errors do not go uncaught.
In that vein I have a strict.sh, which contains things like:
set -e
set -u
set -o pipefail
And…
Danny Staple
- 2,131
- 1
- 15
- 22
81
votes
2 answers
What do the brackets around processes mean?
$ ps -Awwo pid,comm,args
PID COMMAND COMMAND
1 init /sbin/init
2 kthreadd [kthreadd]
3 ksoftirqd/0 [ksoftirqd/0]
5 kworker/u:0 [kworker/u:0]
6 migration/0 [migration/0]
7 cpuset …
joslinm
- 931
- 1
- 7
- 7
81
votes
5 answers
Why is SIGINT not propagated to child process when sent to its parent process?
Given a shell process (e.g. sh) and its child process (e.g. cat), how can I simulate the behavior of Ctrl+C using the shell's process ID?
This is what I've tried:
Running sh and then cat:
[user@host ~]$ sh
sh-4.3$ cat
test
test
Sending SIGINT to…
rob87
- 813
- 1
- 7
- 6
81
votes
6 answers
Listing packages in Yum that depend on another installed package
I am trying to install a 3rd-party RPM package on RHEL5 which depends on version 3.4 of sqlite. According to Yum I already have 3.3.6 installed.
Is there a way to list the installed packages that depend on sqlite 3.3.6?
Rich
- 4,439
- 10
- 33
- 34
81
votes
11 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
- 16,149
- 29
- 101
- 149
81
votes
15 answers
mount.nfs: access denied by server while mounting on Ubuntu machines?
I have three machines in production -
machineA 10.66.136.129
machineB 10.66.138.181
machineC 10.66.138.183
and all those machines have Ubuntu 12.04 installed in it and I have root access to all those three machines.
Now I am supposed to…
arsenal
- 3,053
- 17
- 44
- 49
81
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,723
- 13
- 44
- 66
80
votes
3 answers
Why is 'umount' not spelled 'unmount'?
I am wondering if there is any historical or practical reason why the umount command is not unmount.
uloBasEI
- 3,007
- 2
- 21
- 18
80
votes
9 answers
How to append date to backup filename
I need to make a backup of a file, and I would like to have a timestamp as part of the name to make it easier to differentiate.
How would you inject the current date into a copy command?
[root@mongo-test3 ~]# cp foo.txt {,.backup.`date`}
cp:…
spuder
- 17,643
- 36
- 91
- 119
80
votes
4 answers
File Permissions mode ending in @ or +
I was changing file permissions and I noticed that some of the permissions
modes ended in @ as in -rw-r--r--@, or a + as in drwxr-x---+. I've looked
at the man pages for chmod and chown, and searched around different help
forums, but I can't find…
Nathan
- 903
- 1
- 7
- 5
80
votes
4 answers
How to list processes locking file?
Using flock, several processes can have a shared lock at the same time, or be waiting to acquire a write lock. How do I get a list of these processes?
That is, for a given file X, ideally to find the process id of each process which either holds, or…
Benubird
- 5,752
- 10
- 36
- 41
80
votes
3 answers
Which process has PID 0?
I'm looking for the process started in Linux which has process ID 0. I know init has PID 1 , which is the first process in Linux, is there any process with PID 0?
user9744
- 711
- 2
- 8
- 10
80
votes
4 answers
How to turn off the beep only in bash tab-complete
I find the beep useful for some things, so I only want to turn it off for tab completion (I'm not asking how to completely turn it off, that has already been answered in a different question on Serverfault). I also don't have root access, working on…
Shep
- 991
- 1
- 8
- 7