commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Found it on snipt, pok3, is it yours?
I put my user = m33600, the password and the status was my robot message:
Settima robot message: ALARM ZONE 3 (sent via command line).
Now bots may have their identity on twitter...
Skype has an internal regex which depicts the emoticons it supports. However you cannot simply search the binary file for it. This small 181 character line will do just that, provided skype is running. And of course, only works in linux.
Use this if you don't have access to GNU grep's -B option.
Don't have GNU tar installed that supports the redirect option (-C)? Use this.
Oracle DBA remove some logfiles which are still open by the database and he is complaining the space has not been reclaimed? Use the above command to find out what PID needs to be stopped. Or alternatively recover the file via:
cp /proc/pid/fd/filehandle /new/file.txt
Type this into windows via run and it will display to you your complete policy for windows. This includes group policy, security policy and your active directory account (min password etc)....
When plumbers use pipes, they sometimes need a T-joint. The Unix equivalent to this is 'tee'. The -a flag tells 'tee' to append to the file, rather than clobbering it.
Tested on bash and tcsh.
Using perl, here, we grep the man page of fetchmail to find the paragraph starting with '-k | --keep' and ending before the paragraph starting with '-K | --nokeep'
Set an alarm to starts in specific time.
Sleep 5h and plays the song as a wake up alarm
merge a.pdf b.pdf and c.pdf and create ./out.pdf
I've used this scan to sucessfully find many rogue APs on a very, very large network.
Using a widescreen monitor, I often get annoyed that the RDP window is too high, or too narrow for what I want to display. In this example, I'm on a 1680 x 1050 display.
get desired info from machine and pipe it txt file.
With a full installation of Solaris 10, the graphical login and desktop will start by default. This command will disable that feature. To enable it again use: /usr/dt/bin/dtconfig -e
adobe updater keeps popping up. (normal update fails, probably due to insufficient rights)
Very handy and time-saving.
Do a 'ctrl+ r' on command prompt. You will see a "(reverse-i-search)`':" mark. Just type any sub-string of the command you want to search(provided you have used it sometime in the same session).
Keep on searching by repeatedly pressing ctrl+r. Press enter once you get the desired command string.
This is great if you are behind a router that does not support dynamic dns updates!
Example: AT&T u-verse gateway...
Put this in a script and run it as a cron job.