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:
RHEL / CentOS Support 4GB or more RAM ( memory )
In the sample output I used google.com.
# tar -zxf gpac-0.4.5.tar.gz
# tar -zxf gpac_extra_libs-0.4.5.tar.gz
# cd gpac_extra_libs
# cp -r * ../gpac/extra_lib
# cd ../gpac
# chmod +x configure
# yum install zlib*
# make lib
# make apps
# make install lib
# make install
# cp bin/gcc/libgpac.so /usr/lib
list all the processes
I often forget to type sudo before a command that needs it. This is the quickest way to rerun the command prefixed by sudo.
I have this as a file called deletekey in my ~/bin.
Makes life a little easier.
I am new to linux, and I was trying to figure out why I could not sudo with my username in Fedora 10. This command, when run as root, will add a line to the sudoers file allowing the loginname supplied to sudo. The above line will require a password when you sudo, if you wish to sudo without password, use:
echo 'loginname ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
instead. you have to run this command as su, and this is just an easier way of using visudo, just adds it right from the terminal.
If you want to delete lines fast then all you need to do is vi/vim a text file, type in the amount of lines you want to delete (in my example I wanted to delete 10056 lines) followed by dd (no spaces). There will be no output so becareful with what number you type.
Installs busybox to an obscure directory on the HTC evo
command to turn off your computer when you go home and can not wait
Sometimes you want to know the summary of the sizes of directories without seeing the details in their subdirectories. Especially if it is going to just scroll off the screen. This one liner summarizes the disk usage of any number of directories in a directory without giving all the details of whats happening underneath.
Print "Art of hacking..." 100 times by perl
or you can this tools : http://packetstormsecurity.org/shellcode/shellcodeencdec.py.txt
I absolutely love this website, and appreciate every contribution. This is the first place I go when I'm stuck, you all have some great ideas. But contributions seem to be slipping a little. If all of us could contribute more code from time to time, this site would be absolutely incredible. Since I'm a relative newcomer to commandline-fu, I don't have the knowledge to contribute much, but I will do what I can.
The script contains a single command:
Simply copies your public key to the remote system. For the first time, this will require a password for the user@remote account. From then on, ssh will ask for your private key keyphrase occasionally but you won't need to use the password. Very handy when you're moving files for testing etc.
get cpu info from dmesg