Grep for a TAB . -- www.fir3net.com --
Shows the status of SElinux. -- fir3net.com -- Show Sample Output
-d: list directory entries instead of contents, and do not dereference symbolic links
Remove your BASH history and then link it to /dev/null
Very useful for interactive scripts where you would like to return the terminal contents to its original state before the script was run. This would be similar to how vi exits and returns you to your original terminal screen.
Save and clear the terminal contents with:
tput smcup
Execute some commands, then restore the saved terminal contents with:
tput rmcup
No need for -l and the output can be sent directly into another function expecting directory names. Show Sample Output
same, except it works on any OS with Perl installed. DOS, Windose, whatever
Best way I know to get rid of .bash_history and don't allow bash to save the current one on exit Edit: added ~/ before .bash_history, just in case... ;)
Using column to format a directory listing Show Sample Output
Transforms a file to all uppercase.
It is not easy to make perl give a segfault, but this does it. This is a known issue but apparently not easy to fix. This is completely useless except for showing people that perl is not bullet-proof. Show Sample Output
I was previously unaware of the -v switch. As a result I never got specifics about which interfaces the allowed or dropped applied to. Thought I'd share the wealth... FYI, -n prevents DNS resolving of IPs.
This is how I list the crontab for all the users on a given system that actually have a crontab. You could wrap it with a function block and place it in your .profile or .bashrc for quick access. There's prolly a simpler way to do this. Discuss. Show Sample Output
This will comment out a line, specified by line number, in a given file.
Searches for all .project files in current folder and below and uses "svn info" to get the last changed revision. The last sed joins every two lines. Show Sample Output
Refresh the cache of font directory , usefull after you download font (.ttf or other) from various website and you don't want to reboot or relogin . Close your word processor before using the command , after the refresh reopen your word processor , new fonts is avaible ! Show Sample Output
The really awesome bash completion in debian seems to be an extra package now, which has to be installed. After sourcing /etc/bash_completion it completes almost everything (package names in apt... etc) :-) To make this permanent, put something like this in your .bashrc: if [ -f /etc/bash_completion]; then source /etc/bash_completion fi
The "-d" option for gnu's "date" command can calculate positive or negative offset from any time, including "now". You can even specify a source timezone (the output timezone can be set with the TZ environment variable). Useful! Fun! Not very well documented! Show Sample Output
Comments can be used directly on the command line so I can save in the history a brief description of what command does.
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: