'yum deplist XXX' provides a list of packages that XXX depends on. This command provides a list of packages that depend upon XXX (package reverse dependencies) Show Sample Output
NMON Data collector , DQME log on to appma569 as root cd /tmp nmon -f -T -^ -s 15 -c 12 Show Sample Output
The AWK part of the code will "collate" the fields from 2nd to Nth field (this is to handle any svn directories that may have spaces in them - typical when working with code that is interchangeably used with windows environment - for example, documentation teams) - the output is passed to "ls -ld" - the -d option to ls will tell ls to handle directories itself, rather than do ls on the directory. The '-p' option is just for pretty printing directories, links and executables (for added readability). Finally, the entire "constructed" command will be passed onto sh for shell execution. Show Sample Output
http://ifconfig.me is a web site which shows your public iP address. If you want use your own code, you can use PHP code such as: function getip() { return "".$_SERVER["REMOTE_ADDR"]; } echo getip(); ?> Then, you'll get your IP by 'curl yourfile.php'. Show Sample Output
When bundle install sucks ...This runs isuckat_ruby.rb and when stderror matches find gem ' it will gem install what ever is missing ... Show Sample Output
This is priceless for discovering otherwise invisible characters in files. Like, for example, that stray Control-M at the end of the initial hash bang line in your script, which causes it to generate a mysterious error even though it looks fine. ('od' is the last word, of course, but for many purposes it's much harder to read.)
Create subtitle file heading.ssa with just one entry for the entire video duration. Command line sets that entry's text on top of the video as text watermark. If text is an URL works nice for sending people back to your site from a YouTube clip. Output file is lossless encoded and suitable for further processing. Subtitle file can be a URL so it's saved remotely.
not my cmd... found on the web Show Sample Output
More readable version of factorial calculation using standard desktop calculator instead of bc.
Decrypt with:
gpg -o- foo.tgz.gpg | tar zxvf -
This one has a better performance, as it is a one pass count with awk. For this script it might not matter, but for others it is a good optiomization.
"find ./ ..." could be replaced with "find $PWD ..." to display absolute path instead of relative path. Show Sample Output
Pass the files path to finfo(), can be unix path, dos path, relative or absolute. The file is converted into an absolute nix path, then checked to see if it is in-fact a regular/existing file. Then converted into an absolute windows path and sent to "wmic". Then magic, you have windows file details right in the terminal. Uses: cygwin, cygpath, sed, and awk. Needs Windows WMI "wmic.exe" to be operational. The output is corrected for easy...
finfo notepad.exe
finfo "C:\windows\system32\notepad.exe"
finfo /cygdrive/c/Windows/System32/notepad.exe
finfo "/cygdrive/c/Program Files/notepad.exe"
finfo ../notepad.exe
Show Sample Output
Use this command to execute the contents of http://www.example.com/automation/remotescript.sh in the local environment. The parameters are optional.
Alterrnatives to wget:
CURL:
curl -s http://www.example.com/automation/remotescript.sh | bash /dev/stdin param1 param2
W3M:
w3m -dump http://www.example.com/automation/remotescript.sh | bash /dev/stdin [param1] [param2]
LYNX:
lynx -source http://www.example.com/automation/remotescript.sh | bash /dev/stdin [param1] [param2]
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: