Removing Course name prefix added Show Sample Output
Useful for checking if a large number of PNG files was downloaded successfully by verifying the built-in CRC checksum. For incomplete files, the command will print: "00002309.png EOF while reading IDAT data ERROR: 00002309.png" The process is very fast; checking 21,000 files of 5MB in size took only five minutes on a 2011 Intel mobile dual-core.
This command is almost the same as 'ls -a', but it does not display the current dir (.) or parent (..)
Coming back to a project directory after sometime elsewhere? Need to know what the most recently modified files are? This little function "t" is one of my most frequent commands. I have a tcsh alias for it also: alias t 'ls -ltch \!* | head -20' Show Sample Output
Creates a PDF (over ps as intermediate format) out of any given manpage. Other useful arguments for the -T switch are dvi, utf8 or latin1.
Output manpage as plaintext using cat as pager: man -P cat commandname And redirect its stdout into a file: man -P cat commandname > textfile.txt Example: man -P cat ls > man_ls.txt
Renames all the jpg files as their timestamps with ".jpg" extension. Show Sample Output
Can easily be scripted in order to show permission "tree" from any folder. Can also be formated with
column -t
{ pushd .> /dev/null; cd /; for d in `echo $OLDPWD | sed -e 's/\// /g'`; do cd $d; echo -n "$d "; ls -ld .; done; popd >/dev/null ; } | column -t
from http://www.commandlinefu.com/commands/view/3731/using-column-to-format-a-directory-listing
Show Sample Output
Require "grep -P" ( pcre ).
If you don't have grep -P, use that :
grep -Eo '"url":"[^"]+' $(ls -t ~/.mozilla/firefox/*/sessionstore.js | sed q) | cut -d'"' -f4
If you want all the URLs from all the sessions, you can use :
perl -lne 'print for /url":"\K[^"]+/g' ~/.mozilla/firefox/*/sessionstore.js
Thanks to tybalt89 ( idea of the "for" statement ).
For perl purists, there's JSON and File::Slurp modules, buts that's not installed by default.
searching for sed to make a csv, I found the solution from Mr. Stolz in http://funarg.nfshost.com/r2/notes/sed-return-comma.html
you can also to use:
tr "\n" "," ;
But I was looking for a sed way =)
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: