Commands tagged bash (821)

What's this?

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.

Share Your Commands


Check These Out

Pull git submodules in parallel using GNU parallel
Make sure to run this command in your git toplevel directory. Modify `-j4` as you like. You can also run any arbitrary command beside `git pull` in parallel on all of your git submodules.

Join a folder full of split files
If you use newsgroups then you'll have come across split files before. Joining together a whole batch of them can be a pain so this will do the whole folder in one.

Find broken symlinks
This is much safer than using -L, because it will not follow links that point to places outside the target directory subtree (CWD, in this case). See here for explanation: http://unix.stackexchange.com/a/38691/9382

ping as traceroute
This command uses ping to get the routers' IP addresses to the destination host as traceroute does. If you know what I mean..

install all archive file type apps in ubuntu

Gzip files older than 10 days matching *
Useful for a cron job that runs nightly, gzipping or alternatively deleting files from a specific directory that are older than 10 days (in this case)

open path with your default program (on Linux/*BSD)
open [path] in the default program, regardless of which Desktop Environment you use (KDE, GNOME, etc.) Works on all "freedesktop.org" compatible desktop environments

find files in a date range
Find files in a specific date range - in this case, the first half of last year. -newermt = modification time of the file is more recent than this date GNU find allows any date specfication that GNU date would accept, e.g. $ find . -type f -newermt "3 years ago" ! -newermt "2 years ago" or $ find . -type f -newermt "last monday"

Monitor system load and print out top offending processes
This checks the system load every second and if it's over a certain threshold (.8 in this example), it spits out the date, system loads and top 4 processes sorted by CPU. Additionally, the \a in the first echo creates an audible bell.

Auto download Ubuntu 10.04 LTS with super fast zsync
Need to have rc iso pre-downloaded before running command.


Stay in the loop…

Follow the Tweets.

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

Subscribe to the feeds.

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: