Commands by flojo (3)

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

Drop or block attackers IP with null routes
Someone might attack on your system. You can drop attacker IP using IPtables. However, you can use route command to null route unwanted traffic. A null route (also called as blackhole route) is a network route or kernel routing table entry that goes nowhere. Matching packets are dropped (ignored) rather than forwarded, acting as a kind of very limited firewall. The act of using null routes is often called blackhole filtering.

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"

Get mouse location (X,Y coordinates)

Replace spaces in filename
This command will replace spaces in filename with underscore, for all file in directory that contain spaces.

Run netcat to server files of current folder

Create a single PDF from multiple images with ImageMagick
Given some images (jpg or other supported formats) in input, you obtain a single PDF file with an image for every page.

list block devices
Shows all block devices in a tree with descruptions of what they are.

Find the package that installed a command

Split File in parts
Split File in 19 MB big parts, putting parts together again via cat Nameforpartaa Nameforpartab Nameforpartac >> File

Be notified about overheating of your CPU and/or motherboard
You'll be notified if your core 1 temperature exceeds 50 degrees, you can change the monitored device by editing the "Core 1" or change the critical temperature by editing the "-gt 50" part. Note: you must have lm-sensors installed and configured in order to get this command working.


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: