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:
if you cd into a directory then cd into another directory somewhere else then you run the cd - command you will go to the previous directory you was in!! To go back to the other directory just run it again. So if you are working in 2 different directories then this is the perfect command for you.
just change SELINUX=enforcing to SELINUX=permissive, and you're done. Reboot if you want to prove it.
This is a nice way to kill processes.. the example here is for firefox!!! substitute firefox for whatever the process name is...
Allow to launch nc like a daemon, in background until you still stop it.
(like this command: http://www.commandlinefu.com/commands/view/9978 )
For send script or commands from the client to the server, use nc too, like that :
cat script.sh | nc server 1025
echo "service openvpn restart" | nc server 1025
The loop's inside doesn't do anything, but we can add echo -e "\nCommand received\n" .
This decompresses the file and sends the output to STDOUT so it can be grepped. A good one to put in loops for searching directories of gzipped files, such as man pages.
Install a deb package you have downloaded (synaptic has to be closed).
(dpkg-dev needs to be installed)
After that you may have to run following:
sudo apt-get install -f
(that should fix any dependency problems)
I am using ubuntu linux
Work only with bash and apt-file installed.
When it found an unknow command, it will search for a file named "scribus" (in my example), in a folder named bin and then install the corresponding package.
After installation, it will run the command.
Usefull juste after reinstalling linux and missing lot of package.
Thanks for the comments
evento.sh needed for awk syntax
the aplay command makes a camera sound. It takes a picture of who looked at the display
#!/bin/bash
# evento.sh: deteta evento e fala
awk '{print}' | espeak -v pt -stdin
awk '/e/{print "emergencia"}' | espeak -v pt -stdin
aplay -q /home/mm/bash/camera.wav # -q inibe verbose do comand aplay
exit 0