[geeks] find - having a senior moment
dougmc at frenzied.us
Wed Jan 16 14:18:37 CST 2008
On Mon, Jan 14, 2008 at 12:26:10PM -0800, Brian Dunbar wrote:
| I'm having a senior moment - I wanted to do something I did last week and
| I can't remember how I did it.
| Last week I ran a find command that produced output like so ..
| 95732 ./NonAgileFiles/t_agile60971292.doc
| 87060 ./NonAgileFiles/t_agile60978519.doc
| 112396 ./NonAgileFiles/t_agile61418345.doc
| 0 ./NonAgileFiles/New Text Document.txt
| With the first column being the size of the file. Now how in the name of
| Ogg did I do that?
One way I don't see being mentioned would be with gnu find and doing this --
find . -type f -printf "%s\t%p\n"
| It was so darn clever that I thought I didn't need to
| write it down ..
Personally, I have a setup where each shell's history is kept by PID
in a directory, and I have a perl script that takes these lists, keeps
only the most recent version of duplicates and keeps all my history
forever, and keeps the most recent 1000 lines to be loaded into each
shell at startup ...
So, it looks like I've got every command line I've ever typed on my
own machines going back to 1995 :) Saves lots of time ...
Doug McLaren, dougmc at frenzied.us
Honesty is the best policy, but insanity is a better defense.
More information about the geeks