commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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.
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:
Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:
In this case, I'm keeping an eye on /var/log/messages, but of course any file will do. When I'm following a file, I generally don't want to see anything other than what has been added due to the command or service I've executed. This keeps everything clean and tidy for troubleshooting.
Useful to e.g. keep an eye on several logfiles.
It displays, last 15 yum operations (in last operation as first row order) with its dates. Change 15 to any number of operations you need to display or remove "| tac" to see it in reverse order (last operation as last row)
This will play the audio goodness posted up on PlayTweets via twitter right form the ever loving cmdline. You do not even need a twitter account. I hashed this out in a bit of a hurray as the kids need to get to sleep....I will be adding a loop based feature that will play new items as they come in...after what your are listening to is over.
http://twitter.com/playTweets for more info on playtweets
Generated the CPU utilization stats with 5 lines /every 2 seconds.
Needs sysstat package to be installed prior to use sar.
List the files a process is using.
Copy the file with the given .extension at the source file's location. Eliminates the typing of long paths again and again.
Replace all ocurrences in the file.
The g option is to replace more than one occurrence in the same line. Whitout the g option, it only replace the first occurrence in the line.
This is a simple case of recursing through all directories, adding the '.bak' extension to every file. Of course, the 'cp $file $file.bak' could be any code you need to apply to your recursion, including tests, other functions, creating variables, doing math, etc. Simple and clean recursion.
Useful mainly for debugging or troubleshooting an application or system, such as X11, Apache, Bind, DHCP and others. Another useful switch that can be combined with -mmin, -mtime and so forth is -daystart. For example, to find files that were modified in the /etc directory only yesterday:
sudo find /etc -daystart -mtime 1 -type f
Redirect the local port 2000 to the remote port 3000. The same but UDP:
nc -u -l -p 2000 -c "nc -u example.org 3000"
It may be used to "convert" TCP client to UDP server (or viceversa):
nc -l -p 2000 -c "nc -u example.org 3000"
It allows customizing by means of lesspipe. You need to write a ~/.lessfilter script and put this into your ~/.bashrc:
Everyone on CLIFU needs to check this site out. Learn how to accomplish what you've been doing faster and more efficiently.
Saved my day, when my harddrive got stuck in read-only mode.
Traffic details on the Ethernet interface.
Search the pattern in bzip2 compressed file with out having to unzip.
Gives information about user's home directory and real name and shell user is having.
Get the hard disk information with out shutting down and opening the system.
It gives information on model no., serial no., cylinders/heads/sectors, and the supported features of the hard disk.
To know the OS distro and version, release.
Is same like /etc/redhat-release