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:
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
Without the -dump option the header is displayed in lynx. You can also use w3m, the command then is
w3m -dump_head http://www.example.com/
This is a dirty raw way to simply list ELF objects in a folder.
The output is ready to be parsed i.e to the stripper or what else needs a path to an ELF object.
The -d flag sets the lifetime of a metric and defaults to 0 hence why old metrics continue to be graphed in the dashboard. Submitting a dummy value and short lifetime ensures that the metric is removed from the dashboard.
This is a bit of a hack, but it will get your fwguid which is needed sometimes when using your iPod.
Is a simple script for video streaming a movie
Group membership in OS X is a mish-mash of standards that end up meaning there's almost a half-dozen of ways to belong to a group, what with group inheritance and automatic assignment. This means there's no easy command to find out all groups a user belongs to. The only sensible way then is to list all users and then query each user for membership.
NOTE: This is a function. Once input you can execute it by calling with a groupname.
This will play the audio goodness posted up on PlayTweets via twitter right form the ever loving cmdline. You do not even need a twitter account. I hashed this out in a bit of a hurray as the kids need to get to sleep....I will be adding a loop based feature that will play new items as they come in...after what your are listening to is over.
http://twitter.com/playTweets for more info on playtweets
'ac' is included in the package 'acct', which is described as "The GNU Accounting utilities for process and login accounting". Other interesting flags are:
* print statistics for a specified user
ac -d username
* print statistics for all the users
With my command, the output is also printed in a sexagesimal, more readable, style.