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

Using PIPEs, Execute a command, convert output to .png file, upload file to imgur.com, then returning the address of the .png.
imgur < /etc/issue % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2360 0 635 100 1725 1027 2792 --:--:-- --:--:-- --:--:-- 4058 http://i.imgur.com/bvbUD.png

save command output to image
It's just because the original command was not working on version's 6.7.7-10.

Get Shellcode from ARM Binaries
Getting shellcode from ARM binaries - @OsandaMalith

Submit data to a HTML form with POST method and save the response
Assume that you have a form , in the source look for something similar to : input name="rid" type="TEXT" input name="submit" value="SUBMIT" type="SUBMIT" align="center" Then exec the command to get the response into html More info : www.h3manth.com

Url Encode
It only encodes non-Basic-ASCII chars, as they are the only ones not well readed by UTF-8 and ISO-8859-1 (latin-1). It converts all * C3 X (some latin symbols like ASCII-extended ones) and * C2 X (some punctuation symbols like inverted exclamation) ...UTF-8 double byte symbols to escaped form that every parser understands to form the URLs. I didn't encode spaces and the rest of basic punctuation, but supposedly, space and others are coded as \x20, for example, in UTF-8, latin-1 and Windows-cp1252.... so its read perfectly. Please feel free to correct, the application to which I designe that function works as expected with my assumption. Note: I specify a w=999, I didn't find a flag to put unlimited value. I just suppose very improbable surpass the de-facto 255 (* 3 byte max) = 765 bytes length of URL

Generate a binary file with all ones (0xff) in it
This is similar to how you would generate a file with all zeros $ dd if=/dev/zero of=allzeros bs=1024 count=2k

Append last argument to last command
Just like "!$", except it does it instantly. Then you can hit enter if you want.

useful tail on /var/log to avoid old logs or/and gzipped files
with discard wilcards in bash you can "tail" newer logs files to see what happen, any error, info, warn...

Get the IP of the host your coming from when logged in remotely
Even faster without the need for cut... :)

download a list of urls


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: