commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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.
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:
take a list of IP:PORT and output IP:PORT:COUNTRY
Traffic details on the Ethernet interface.
When you press "cmd+n" in TextMate, you can have "HTML" language as default document format... You can also define other languages too. You need to know the UUID of your language bundle.
1.) my profile ends with $USER not with .default
2.) only grep for the first occurrence because some extensions have the translated name also inside the install.rdf
This is an easy way to quickly get a status for a device in multipath on SLES systems, as long as the server is configured based on Novell's standards, where multipathed disks are referred to by /dev/disk/by-... tree. Make sure to replace name_of_vg with your Volume Group name.
Instead of dumping the entire query to the screen, it will use 'less -S' to handle pagination. This means you can move back and forward through the result set, and instead of wrapping rows at screen boundaries, the table will extend off the screen, and can be scrolled left and right with arrow keys.
1. Get name of task by task=$(basename "$(pwd)")
2. Check whether "$task.c" exists as a file
3. open "$task.c", "$task.in", "task.out" in vim with such layout.
| | $task.in |
| | |
| | $task.out |
| | |
This is a bit hacky, but if you're setting up a bunch of new LUNs, it can save a bunch of time. Also check out sfdisk. The fdisk will fail if, for example, a partition table already exists.
* Make a FIFO file named replypipe
* listen on 1234
* pass the request to unix socket
* unix socket will reply to replypipe
* replypipe will write reply to the client
From a saved page of google search results, split out all of the links for the results. Useful for creating apache rewrite rules from.
Use this to make a launcher for Java apps ( .jar files ) such as with jdownloader
joins multiple lines to create single line with comma separated values. for example if we have an email addresses one per line (copy&paste from spreadsheet) it will oputput one line with comman separated addresses to put it to email client.
This is helpful if you connect to several networks with different subnets such as 192 networks, 10 networks, etc. Cuts first three octets of ip from ifconfig command and runs nmap ping scan on that subnet.
Replace wlan0 with your interface. Assumes class c network, if class b use: cut -d "." -f 1-2 and change nmap command accordingly.
This shows a list of channels from seeon.tv website to watch shows and movies
Very useful for finding the largest files and subdirectories at any given point. Any user can run it from current location just when need to know their largest files and subtdirectories from a certain point down as well.
This will change the ownership of /../../somedirectory as well as all its subdirectories so they will be be owned by user2 - typically used when a directory is owned by root:root
Puts words on new lines, removing additional newlines.
Converts all ogg files to mp3 files in the current directory.
Open Port Check
I'm sure almost everybody knows this by now. This command will pull the password for the admin login of any plesk machine.
mencoder mf://filemask -mf
option availble for mf :
* w=value : the width of the output, by d?fault : autodetected
* h=value : height of the output, by default : autodetected
* fps=value : framerate of the output, by default : 25
* type=value : file format type input , avaible: jpeg, png, tga, sgi