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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
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:
Clear the screen and list file
Add an "alert" alias for long running commands
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! :)
This alias is super-handy for me because it quickly shows the details of each file in the current directory. The output is nice because it is sortable, allowing you to expand this basic example to do something amazing like showing you a list of the newest files, the largest files, files with bad perms, etc..
A recursive alias would be:
alias LSR='find -mount -printf "%.5m %10M %#9u:%-9g %#5U:%-5G %TF_%TR %CF_%CR %AF_%AR %#15s [%Y] %p\n" 2>/dev/null'
MAC OSX doesn't come with an updatedb command by default, this will emulate the updatedb thats on a typical Linux OS.
Simply add it to your ~/.bash_profile
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
Terminal Color tester using python, works with py2 and 3
There is no need to use the shell or construct. Screen offers varius ways of detaching and reattaching. man screen and look for -[rRdD].
to create a named session: sdr moo
resume: sdr moo
Uses pygmentize and python to create indented and colorized JSON output
wonder below line why doesn't work
echo "alias ls='ls --color'">>~/.profile
g clone --local --bare . /repo.git
g remote add alias /repo.git
g push alias branch
g log -p filename
g checkout SHA1_rev
g reset --hard
g checkout -b new_branch
g ls-files --deleted
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"
This command attempts to attach to existing irssi session, if one exists, otherwise creates one.
I use "irc" because I use different irc clients depending on what system I am working on. Consistency is queen.
Sometimes I would like to see hidden files, prefix with a period, but some files or folders I never want to see (and really wish I could just remove all together).
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.
This was me just succumbing to the habits, but now I rarely use quit or vim directly, so beware! :)
use vim like less command pager but with color highlighting = pretty :p
also u can use /usr/share/vim/vim73/macros/less.sh