Commands for the wicked (109)

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

Output files without comments or empty lines
better integration. works on all Unices works one bash and ksh.

Monitor dynamic changes in the dmesg log.
Other logs can be monitored similarly, e.g. $ watch "tail -15 /var/log/daemon.log"

convert unixtime to human-readable
Mac have direct conversion of seconds (Epoch time)

check open ports without netstat or lsof

easily strace all your apache processes
Will open strace on all apache process, on systems using sbin/apache (debian) or sbin/httpd (redhat), and will follow threads newly created.

Intercept, monitor and manipulate a TCP connection.
Forwards localhost:1234 to machine:port, running all data through your chain of piped commands. The above command logs inbound and outbound traffic to two files. Tip: replace tee with sed to manipulate the data in real time (use "sed -e 's/400 Bad Request/200 OK/'" to tweak a web server's responses ;-) Limitless possibilities.

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Rename files in batch

Find usb device in realtime
Using this command you can track a moment when usb device was attached.

Adjust all EXIF timestamps in .mov by +1 hour
works for Powershot SD780 IS


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: