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.
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:
Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:
Using a GUI file managers you can merge directories (cut and paste). This command roughly does the same (it doesn't ask for confirmation (no problem for me) and it doesn't clean up the empty SRC directories (no problem, trivial).
probably does the same:
cp -l SRC TARGET; rm -rf SRC
cat without comments
Change your Desktop background/wallpaper with feh lightweight command.
fill background directory with appropriate content.
Well, this is quite useful for testing if your hardware watchdog is working properly.
Output should be two JPG files named like "output-1.jpg" and "output-2.jpg". The convert command is part of ImageMagick so you'll need that and dependent packages installed to use it.
This is especially useful for adding changes to a temporary repo, such as a Gist. Avoid using this when collaborating with others.
I'm the author of PM2 and wrote this tool, and I'm please to share it here.
Github project link: https://github.com/Unitech/pm2
Handy use of bc in the command line. No need to get 'into' the bc to perform calculations
List packages and their disk usage in decreasing order. This uses the "Installed-Size" from the package metadata. It may differ from the actual used space, because e.g. data files (think of databases) or log files may take additional space.
Just an other solution :)
My first command :) I made this command to log public addresses of a virtual interface who connects random VPN servers around the world.
for f in input/*; do BN=$(basename "$f"); ffmpeg -i "$f" -vn "temp/$BN.flac"; sox "temp/$BN.flac" "temp/$BN-cleaned.flac" noisered profile 0.3; ffmpeg -i "$f" -vcodec copy -an "temp/$BN-na.mp4"; ffmpeg -i "temp/$BN-na.mp4" -i "temp/$BN-cleaned.flac" "output/$BN"; done
This was over the 255 character limit and I didn't feel like deliberately obfuscating it.
1. Create 'input', 'output' and 'temp' directories.
2. Place the files that you want to remove the hiss/static/general noise from in the input directory.
3. Generate a noise reduction profile with sox using 'sox an_input_file.mp4 -n trim x y noiseprof profile', where x and y indicates a range in seconds that only the sound you want to eliminate is present in.
4. Run the command.
calls grep on all non-binary files returned by find on its current working directory