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
Show Sample Output
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).... www.fir3net.com
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. Show Sample Output
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' Show Sample Output
Set an alarm to starts in specific time. Show Sample Output
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. Show Sample Output
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. Show Sample Output
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 Show Sample Output
adobe updater keeps popping up. (normal update fails, probably due to insufficient rights) (src: http://aricsblog.blogspot.com/2007/12/adobe-updater-crashes-on-mac-os-x-and.html)
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. Show Sample Output
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.
You can replace "sort -nu" with "sort -u" for a word list sorted or "sort -R" for a random-sorted line (edit: corrected) Show Sample Output
with 'mii-tool -w eth0' you can watch the interface for changes of the link status Show Sample Output
Helpful when we want to do mass file renaming(especially mp3s). Show Sample Output
somewhat faster version to see the size of our directories. Size will be in Kilo Bytes. to view smallest first change '-k1nr' to '-k1n'.
readlink -f accepts a relative, noncanonical path and emits the corresponding canonical, absolute path. Show Sample Output
Before doing this, back-up all data on any ext3 partitions that are to be converted to ext4.
After running previous command you MUST run fsck, is needed to return the filesystem to a consistent state.
fsck -pDf /dev/yourpartition
Edit /etc/fstab and change the 'type' from ext3 to ext4 for any partitions that are converted to ext4.
commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.
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: