Just type it and hit enter and you will get it.
Recursive grep through directory for file.
convert to debian package file (deb) a redhat package file (rpm) , then you can install it by using dpkg , require alien package ( sudo apt-get install alien first ) Show Sample Output
This find files of name like *.log and truncates them.
When searching in vi, the search string gets highlighted but the highlighting can become a nuisance. By searching for the very unlikely pattern "^~" the highlighting is effectively switched off. Show Sample Output
This command lists extended information about files, i.e. whether or not it is a true file or link, who owns it, etc. without having to 'ls' from the specific directory. If you know the filename, but not the location, this helps with finding other information about the file. It can be truncated by creating an alias for 'ls -l'. The sample output shows difference in regular locate vs. ls + locate. Show Sample Output
When you SSH to a server who's hostname or IP has changed since the last time a connection was recorded in the known_hosts file a warning will be displayed since this indicated a possible DNS spoofing attack. If this is a known change then this command will remove the previous entry and allow the SSH connection. The SSH client will prompt you as if it was the first time connected to the server. Replace ${LINE} with the line of the offending key in ~known_hosts. 49 in the sample output. Show Sample Output
Nth line of a file - dirty hack way. I haven't used ed in ages ;-) Show Sample Output
Silly approach, but easy to remember... Show Sample Output
This will only work on files since ls won't tell the size of a directory contents. Note that the first switch is the digit one, not the letter ell.
Simple but useful little command to unzip all files in a directory.
Say you need to ping every 5th IP address on your network .. this will give you a way of doing that.
jot can also do counting ... like
jot 4
1
2
3
4
download from http://oreilly.com/catalog/upt2/examples/#jot or fins athena-jot in rpm format
Show Sample Output
Works 99.9% of the time; so far never required a more complex expression in manual input.
commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.
Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):
Subscribe to the feed for: