Most Popular
1500 questions
81
votes
2 answers
What is the difference between shell, eshell, and term in Emacs?
In Emacs I can run a shell using following commands -
M-x term
M-x shell
M-x eshell
What is the difference between these three?

Kshitiz Sharma
- 8,785
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,047
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
- 18,053
80
votes
3 answers
Can I rollback an apt-get upgrade if something goes wrong?
Is there a way, before starting an aptitude upgrade or apt-get upgrade, to set up something so that you can "easily" rollback your system to the "apt" state it was before the actual upgrade, if something goes wrong?
That is, for example, reinstall…

Totor
- 20,040
80
votes
6 answers
How do I remove all sub-directories from within a directory?
This question is kind of a phase II to the first question I posted at here
I have a directory that contains a bunch of sub-directories, .zip files, and other random files not contained within a sub-directory.
I'd like a command line script to remove…

Evster
- 1,695
- 2
- 13
- 12
80
votes
5 answers
How to scroll the screen using the middle click?
On Windows, most programs with large, scrollable text containers (e.g. all browsers, most word processors and IDEs) let you press the middle mouse button and then move the mouse to scroll. This scrolling is smooth and allows you to scroll very…

Mark Amery
- 3,000
80
votes
9 answers
Bulk rename, change prefix
How can I bulk replace the prefix for many files?
I have a lot of files like
TestSRConnectionContext.h
TestSRConnectionContext.m
I would like to change all them to
CLConnectionContext.h
CLConnectionContext.m
How would I do this?

ErikTJ
- 923
80
votes
3 answers
What is a "loop device" when mounting?
I am mounting an ISO file, and looking at this tutorial. They use the command:
$ mount -o loop disk1.iso /mnt/disk
I'm trying to understand the use of -o loop. I have two questions:
When I look at the long man page for mount, it takes time to find…

Vass
- 5,371
80
votes
4 answers
Cygwin has no watch command?
I installed Cygwin on my Windows XP to use some of its commands. Now I what to check a file every 2 minutes and want to use watch for this purpose but I see that Cygwin has no such command. Is this really true? what can I do instead?

ethan
- 829
80
votes
4 answers
How to get rid of "No match found" when running "rm *"
Using zsh, I get a "No match found" message when choosing a pattern that does not fit with rm and that even when redirecting the output.
# rm * > /dev/zero 2>&1
zsh: no matches found: *
How can I get rid of this message?

user123456
- 5,018
80
votes
3 answers
I accidentally typed my password into the login field, is it still secure?
I was looking down at my keyboard and typed my password in because I thought I had already typed my login name. I pressed Enter, then when it asked for the password I pressed Ctrl+c.
Should I take some precautionary measure to make sure the password…

hermancain
- 1,289
80
votes
1 answer
Do I need to do something about "Delta RPMs disabled"?
While updating packages on our CentOS server I got the following message:
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
Do I need to do something about that? Should I just ignore this?

user166758
- 803
80
votes
7 answers
How to trick a command into thinking its output is going to a terminal
Given a command that changes its behaviour when its output is going to a terminal (e.g. produce coloured output), how can that output be redirected in a pipeline while preserving the changed behaviour? There must be a utility for that, which I am…

Amir
- 1,651
80
votes
8 answers
mv: Move file only if destination does not exist
Can I use mv file1 file2 in a way that it only moves file1 to file2 if file2 doesn't exist?
I've tried
yes n | mv -i file1 file2
(this lets mv ask if file2 should be overridden and automatically answer no) but besides abusing -i it also doesn't…
80
votes
4 answers
How to add line numbers in every line using shell command?
My file,
PSS-A (Primary A)
PSS-B (Primary B)
PSS-C (Primary C)
PSS-D (Primary D)
PSS-E (Primary E)
PSS-F (Primary F)
PSS-G (Primary G)
PSS-H (Primary H)
PSS-I (Primary I)
SPARE (SPARE)
Output file,
1> PSS-A (Primary A)
2> PSS-B …

Nainita
- 2,862