Tagged Questions
27
votes
6answers
14k views
How can I edit multiple files in VIM?
I know I can open multiple files with vim by doing something like vim 2011-12*.log, but how can I switch between files and close the files one at a time? Also, how can I tell the file name of the ...
25
votes
6answers
739 views
Easy way to determine virtualization technology
I have command line access to a Linux machine which may or may not be virtualized. I want to determine what kind of virtualization technology it runs on, if any (VMWare, VirtualBox, KVM, OpenVZ, Xen, ...
13
votes
2answers
710 views
Accidently created a file called -X, how can I delete it? [duplicate]
Possible Duplicate:
How do I delete a file whose name begins with “-” (hyphen a.k.a. dash or minus)?
Like an idiot, I ran this command:
tar -cf -X awstats-icon icon ...
13
votes
6answers
929 views
Can a Linux command have capital letter(s)?
Can a Linux command have capital letter(s)? I know it's supported but i want to be sure if it's a "problem" or considered "not a good thing"?
12
votes
4answers
11k views
How do I make multiple directories at once in a directory?
I know with mkdir I can do mkdir A B C D E F to create each directory. How do I create directories A-Z or 1-100 with out typing in each letter or number?
12
votes
2answers
222 views
`test` and `[` - different binaries, any difference?
I noticed while answering another question that test and [ are different binaries, but the [ manpage pulls up test's. Besides the requirement for an ending ], is there any difference? If not, why are ...
11
votes
12answers
11k views
Efficiently delete large directory containing thousands of files
We have an issue with a folder becoming unwieldy with hundreds of thousands of tiny files.
There are so many files that performing rm -rf returns an error and instead what we need to do is something ...
11
votes
4answers
6k views
How to attach terminal to detached process?
I have detached a process from my terminal, like this:
$ process &
That terminal is now long closed, but process is still running and I want to send some commands to that process's stdin. Is ...
11
votes
4answers
8k views
What's the best way to join files again after splitting them?
If I have a large file and need to split it into 100 megabyte chunks I will do
split -b 100m myImage.iso
That usually give me something like
xaa
xab
xac
xad
And to get them back together I have ...
11
votes
1answer
421 views
What do all the pictures on the front of the “Unix and Linux System Administration Handbook” represent?
I'm a newcomer to Unix and Linux, and I've been trying to get up to speed on everything. One of the guides I've used is the "Unix and Linux System Administration Handbook"
It's a pretty great book, ...
10
votes
5answers
3k views
What is the difference between ls and l?
I accidentally typed l instead of ls today and found that the command still printed a list of the files in my current directory. Trying l --help brings up the help file for ls suggesting that l is ...
10
votes
8answers
7k views
What's the quickest way to add text to a file from the command line?
Occasionally I have a thought that I want to write into a file while I am at the terminal. I would want these notes all in the same file, just listed one after the other. I would also like a date / ...
10
votes
2answers
429 views
Highlight the three last updated files in ls output
Is there any way to overload or wrap the ls command so that it will highlight / underline / otherwise make obvious the last three modified files?
I know that I can simply ls -rtl to order by reverse ...
10
votes
4answers
838 views
Best method to collect a random sample from a collection of files
Suppose there is a directory holding 300 data files. I want to randomly select 200 of those files and move them into another directory. Is there a way to do that under Unix/Linux?
9
votes
4answers
8k views
Linux ls to show only filename date and size
How can I use ls in linux to get a listing of filenames date and size only. I don't need to see the other info such as owner or permission. Is this possible?