All commands (14,187)

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

Clear your history saved into .bash_history file!
clears the history

For a $FILE, extracts the path, filename, filename without extension and extension.
Useful for use in other scripts for renaming, testing for extensions, etc.

Instant mirror from your laptop + webcam
Flips the y-axis to emulate a real mirror, uses low resolution for speed, this will also hide blemishes and the like :)

Open up a man page as PDF (#OSX)
Simply pass an argument to the script to convert the manual page to a PDF: $man2pdf drutil

Use Dell Service Tag $1 to Find Machine Model [Model Name and Model Number]
255 Max Characters CommandLineFu for $dellurl='http://support.dell.com/support/topics/global.aspx/support/my_systems_info/en/details?c=us&cs=04&l=en&s=hied&ServiceTag='

Stamp a text line on top of the pdf pages.
To quickly add some remark, comment, stamp text, ... on top of (each of) the pages of the input pdf file.

open two files on top of each other in vim (one window, two panes)

Download all Phrack .tar.gzs

Remove a range of lines from a file

Convert a Nero Image File to ISO
This line removes the 300k header from a Nero image file converting it to ISO format


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: