it's a mixed environment where I work, and since we still use WINS services, this is often a quick and dirty way for me to obtain a mac-address for a hostname. please note that nmblookup is part of the samba suite. Just another one of those nearly useless commands that is super cool when and only when you need it. Show Sample Output
Syntax: google query_with_spaces " so, make sure to end your query with a double quote Show Sample Output
Enhancement for the 'busy' command originally posted by busybee : less chars, no escape issue, and most important it exclude small files ( opening a 5 lines file isn't that persuasive I think ;) ) This makes an alias for a command named 'busy'. The 'busy' command opens a random file in /usr/include to a random line with vim.
Prints out the list of date(1) format codes, for quick easy reference.
dateformatcodes
Show Sample Output
use python as calculator, press ctrl+d to exit reminder: when doing factions add atleast one decimal number like so 22.0/7 or 22/7.0 Show Sample Output
Creates an alias that reports your hostname and IP for you computer. Getting the quotes in an alias with awk commands can be a painful. Need uname and ifconfig--both are included in most unix distributions, I believe. Hope it is useful. Show Sample Output
Uses printf command to resize terminal. So far, this is tested to NOT work in Konsole. Works with Mac Terminal, XFCE Terminal, XTerm, gnome-terminal.
Syntax outside of an alias would be printf %b \\033c. This clears the screen and removes scrollback. Works on gnome-terminal and the XFCE's Terminal, and XTerm. It does clear the screen in Konsole and the Mac Terminal, but does not clear scrollback.
Alias to play flash videos with mplayer. You can replace mplayer with your favorite video player.
This alias supports Chrome & Firefox's way of handling the flash plugin. It will play all the videos in the cache. Note that certain videos might never make it to the cache, if the publisher ask for them not to: they will just be loaded in RAM.
A variant if you're just interested in playing the audio, for example for a music :
alias flashmusic="mplayer -vo null \$(find /proc/\$(pgrep -f 'libgcfl|libflashplayer')/fd/ -printf '%p %l\n' |grep FlashXX | cut -d\ -f1)"
To prevent accidental deleting of files you can disable rm with this alias. Then use the trash command from trash-cli instead.
If you want to carry on your aliases while using sudo, put this into a file which will be parsed when logging in. Show Sample Output
Changes machine and cd to specific directory Add to .*shrc Usage : sshto
Put this in your bash startup script so you can quickly remember the top rated commands on CommandLineFu's website. Put it in .bashrc on Linux, or .bash_profile on OSX. Show Sample Output
I realise that this is just a reiteration of another entry (regardless of whether I came up with all this all by myself), but I would like present my additional alias' in context as a method of managing your directories. Rather convenient.
Replace rm, a neat shortcut, with a less permanent method of removal. Note may require you to install the trash client; "sudo apt-get -y install trash-cli" Show Sample Output
MAC OSX doesn't come with a locate command, This will do the same thing as the locate command on a typical Linux OS. Simply add it to your ~/.bash_profile
same as "unset HISTFILE" - but the advantage is that you can "tab-complete" it and when you do, you won't mistype it (which could lead to not unsetting the HISTFILE). put the alias in the ~/.bash_profile or ~/.bashrc file in your users home directory, respawn, enjoy! :) Show Sample Output
Add an "alert" alias for long running commands
Clear the screen and list file
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: