find the uptime and convert in minutes, works with AIX and Linux too Show Sample Output
I use this with alias: alias lsl="ls -1F | grep @ | sed 's/@//' | column"
I use this with alias: alias lsl="ls -1F | grep @$ | sed 's/@//' | column" Limitation: This will also list files that happen to have an @ at the end of the filename.
becuase im lazy and cant be bothered looking at the tv guide to choose a channel , any improvments or comments appreciated
Take a list of words and let mpv play the pronunciation-file from gstatic. Inspired by http://www.commandlinefu.com/commands/view/12574/download-englishword-pronounciation-as-mp3-file.
set BLOCK to "title" or any other HTML / RSS / XML tag and curl URL to get everything in-between e.g. some text
Took one of the samples, added capitalization and removes in between spaces. The final "echo" is just for readability. Cheers Show Sample Output
Shows the OS X applications downloaded from App Store. Doesn't include manually added apps. Show Sample Output
My first command :) I made this command to log public addresses of a virtual interface who connects random VPN servers around the world. Show Sample Output
I did not come up with this one myself, but found this somewhere else several months ago. Show Sample Output
* Find all file sizes and file names from the current directory down (replace "." with a target directory as needed). * sort the file sizes in numeric order * List only the duplicated file sizes * drop the file sizes so there are simply a list of files (retain order) * calculate md5sums on all of the files * replace the first instance of two spaces (md5sum output) with a \0 * drop the unique md5sums so only duplicate files remain listed * Use AWK to aggregate identical files on one line. * Remove the blank line from the beginning (This was done more efficiently by putting another "IF" into the AWK command, but then the whole line exceeded the 255 char limit). >>>> Each output line contains the md5sum and then all of the files that have that identical md5sum. All fields are \0 delimited. All records are \n delimited.
note that sed -i is non-standard (although both GNU and current BSD systems support it)
Can also be accomplished with
find . -name "*.txt" | xargs perl -pi -e 's/old/new/g'
as shown here - http://www.commandlinefu.com/commands/view/223/a-find-and-replace-within-text-based-files-to-locate-and-rewrite-text-en-mass.
If you want to test output, run it like this: for fn in *.epub; do echo mv \"$fn\" \"`echo "$fn" | sed -E 's/\.*\/*(.*)( - )(.*)(\.[^\.]+)$/\3\2\1\4/' | sed -E 's/(.*) ([^ ]+)( - )(.*)/\2, \1\3\4/' `\";done > rename.txt Show Sample Output
Shows all available keyboard bindings in bash. Pretty printing. 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
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: