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

Clone all repos from a user with lynx
https://wuseman.github.io/wcloner/

Simple Gumblar check command

Echo the contents of a Url
Directly send the content of a url to standard out. This command is most convenient for sending the output of a download directly to another command.

vi a remote file with port
If you are running sshd on different port use above this command to edit/view remote file with vi/vim. In above example I am using port 12345.

Force the script to be started as root
Will run the script as root and exit if the wrong or no password is given. Also will keep the parameters active if any where given.

Search big files with long lines
This is a handy way to circumvent the "Maximum line length of 2048 exceeded" grep error. Once you have run the above command (or put it in your .bashrc), files can be searched using: $ lgrep search-string /file/to/search

Rename files in batch

Replace duplicate files by hardlinks
This variation can handle file paths containing spaces.

Create a .png from a command output and upload to ompdlr.org, give URI
Create a .png from output command or whatever, the upload and give URI from ompdlr.org

Schedule a script or command in x num hours, silently run in the background even if logged out
doesn't require "at", change the "2h" to whatever you want... (deafult unit for sleep is seconds)


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: