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.
» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10
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:
Quick and dirty way to disable the Ubuntu notifications that can be quite annoying. It prevent the notify-osd to start so you need to logout Gnome or kill it by hand to take effect.
i have a large video file, 500+ MB, so i cant upload it to flickr, so to reduce the size i split it into 2 files. the command shows the splitting for the first file, from 0-4 minutes. ss is start time and t is duration (how long you want the output file to be).
credit goes to philc: http://ubuntuforums.org/showthread.php?t=480343
NOTE: when i made the second half of the video, i got a *lot* of lines like this:
frame= 0 fps= 0 q=0.0 size= 0kB time=10000000000.00 bitrate= 0.0kbit
just be patient, it is working =)
forces user to rw, group to r, and other to no access.
files will not be marked executable.
directories will be executable for users and groups only.
This will remove all installed kernels on your debian based install, except the one you're currently using.
From:
http://tuxtweaks.com/2009/12/remove-old-kernels-in-ubuntu/comment-page-1/#comment-1590
As of 10.04 LTS, you need to use this command-line to reports bugs to the launchpad.net tracking system (you need a launchpad acct for this to work). This command is preferred over using the website because it collects/sends info about your system to help developers.
ubuntu-bug is a symlink to apport-bug which sees if KDE/Gnome is running and calls apport-gtk/apport-kde dialogs, otherwise apport-cli, so you can fill out a bug report.
First run 'ubuntu-bug' without args to see a list of known symptoms. If there's no matching symptom, or you know which package is to blame, then run 'ubuntu-bug <package>'. If the process is still running, use 'ubuntu-bug <PID>'
Change the APP variable's value to whatever you want to install. Depending on how fast your machine is, you'll want to adjust the value 50 to something else. You might also want to play a different game than Gnometris - just make sure it's a GUI game.
Show active calls as the happen on an Asterisk server. Note that the Asterisk command (in single quotes) is formatted for Asterisk 1.6. Use the -n flag on the watch command to modify the refresh period (in seconds - default is 2 seconds).
I had problems in Ubuntu while trying to edit /etc/resolv.conf, even with sudo I couldn't make any change. After a 2 minutes search on google I found this command.
Hope someone finds it useful.
It works like chmod, with + and - to denote which attributes are being added and which are being removed.
See other attributes on man pages or on wikipedia http://en.wikipedia.org/wiki/Chattr
Limits the usage of bandwidth by apt-get, in the example the command will use 30Kb/s ;)
It should work for most apt-get actions (install, update, upgrade, dist-upgrade, etc.)
if you haven't already done so, install lame and flac:
sudo apt-get install lame flac
Please install aria2c before you try the above command. On ubuntu the command to install aria2c would be:
sudo aptitude install aria2
This command will transcode a MythTV recording. The target device is a Google Nexus One mobile phone. My recordings are from a HDHomerun with Over The Air content. Plays back nicely on the N1.
if you still get a permissions error using sudo, then nano the file:
sudo nano -w /sys/block/sdb/queue/rotational
and change 1 to 0
this thread:
http://www.ocztechnologyforum.com/forum/showpost.php?p=369836&postcount=15
says that this will "help the block layer to optimize a few decisions"
cd to the folder containing the wav files, then convert them all to flac. yeah baby!
in ubuntu, to get the flac program just:
sudo apt-get install flac
flac file input formats are wav, aiff, raw, flac, oga and ogg
Replace 'SHOWNAME' with the name of the TV show.
Add -n to test the command without renaming files.
Check the 'sample output'.
This command will disable the beep sound from the PC speaker.
Lets you set all the java alternatives at once to a matching version. Also has options for just changing the jre or the plugin.
Next time you are leaching off of someone else's wifi use this command before you start your bittorrent ...for legitimate files only of course.
It creates a hexidecimal string using md5sum from the first few lines of /dev/urandom and splices it into the proper MAC address format. Then it changes your MAC and resets your wireless (wlan0:0).