On CentOS at least, date returns a boolean for the common date string formats, including YYYY-MM-DD. In the sample output, you can see various invalid dates returning 0 whereas a simple regex check would return 1 for the invalid dates. -d, --date=STRING display time described by STRING, not `now' The version of date on OS X does not appear to have this same option. Show Sample Output
Monitors the current directory for changes to HAML files and converts them to HTML. Show Sample Output
Use less random number resources and less commands
shows you the symlinks in the current directory, recursively, but without following them Show Sample Output
us lsof, grep for any pid matching a given name such as "node". Show Sample Output
It's quite fun to invert text using "flip.pl" (ref: http://ubuntuforums.org/showthread.php?t=2078323 ). Slightly more challenging is to flip a whole "cowsay". :-) Show Sample Output
I needed to find a command to delete huge numbers of files without intensive cpu load, that command does the job :) The purpose of "+" at then end of the line, tells rm to delete multiple files at once
Fix for PHP Shell Exec: ffmpeg -i input.mp4 -f null /dev/null 2>&1 shell_exec("ffmpeg -i input.mp4 -f null /dev/null 2>&1"); Show Sample Output
The Windows Subsystem for Linux (WSL) is a compatibility layer for running binary Linux executables natively in Windows. A folder such as "C:\Program Files (x86)\Common Files" is represented as "/mnt/c/Program Files (x86)/Common Files". This function allows you to change the current directory to a Windows folder. Show Sample Output
One can test their python regex matching using this shell function.
for e.g.
rgx_match "translate\s*\(([0-9-.]+),([0-9-.]+)\)" "translate(162.11517,76.817357)"
('162.11517', '76.817357')
Perform a dns zone transfer (if is allowed on target dns server) and print result.
for example:
echo "..1234567." | cut -c $(range 3 7)
yields
1234567
omit "> ~/Desktop/MyAppList`date +%s.txt`" if you don't want to print it to a file on your desktop and instead only want to display to console created and tested on: ProductName: Mac OS X ProductVersion: 10.6.3 BuildVersion: 10D573 Show Sample Output
find the files locked by rcs utility Show Sample Output
whereis (1) - locate the binary, source, and manual page files for a command Not actually better, just expanded a bit. The "whereis" command has the following output: whereis gcc gcc: /usr/bin/gcc /usr/lib/gcc /usr/bin/X11/gcc /usr/share/man/man1/gcc.1.gz therefore the 'ls' error on first line, which could be eliminated with a little extra work. Show Sample Output
This probably only works without modifications in RHEL/CentOS/Fedora. Show Sample Output
Ssh to your co-worker's box and watch them go crazy when the cd player ejects Show Sample Output
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: