just booting linux box at the mo, but AWK should do what you want.
try
also statCode:find $folder -name 'ntuser.dat' -ls | awk '{printf $8 ":" $9"\n"}'
Code:stat -c %y ntuser.dat | awk '{ printf $1 "\n"}'
just booting linux box at the mo, but AWK should do what you want.
try
also statCode:find $folder -name 'ntuser.dat' -ls | awk '{printf $8 ":" $9"\n"}'
Code:stat -c %y ntuser.dat | awk '{ printf $1 "\n"}'

No need to fork anything:
Code:find . -type f -name "ntuser.dat" -mtime +90
srochford (5th August 2009)

Thanks for that, but it doesnt seem to be working...
Code:robert@rubuntu:/media/disk/woking$ ls convert.sh The.Shield.1x09.Throwaway.WS.XviDVD-TNS.avi The.Shield.1x12.Two.Days.Of.Blood.WS.XviDVD-TNS.avi robert@rubuntu:/media/disk/woking$ find . -type f -name "*.avi" -o -name "*.mkv" -exec mencoder "{}" -oac lavc -ovc lavc -of lavf -lavcopts aglobal=1:vglobal=1:vcodec=mpeg4:vbitrate=2500:acodec=libfaac -af lavcresample=48000 -vf scale=320:240,harddup -lavfopts format=psp -ofps 30000/1001 -o "{}.mp4" \; robert@rubuntu:/media/disk/woking$

Drop the -exec part, do you get the right list of files?

yep sorry i almost added that this morn. i tried to break it down into segments but couldnt figure it out .

Basically anything after the -exec gets executed literally, up to the '\;' and with '{}' substituted with the filename. Does mencode have a verbose option?
Thanks for that; it helps (need to replace the "." with $folder inside the loop so it starts at the right location and I've added -maxdepth 1 because the only ntuser.dat is going to be at the top level of the profile) but what I think I want (and it's a bit vague because this is a very messy project!) is to get a report of everything and then extract the old ones so they can be deleted/archived/whatever.
As it stands, this will give me a list that shows old ntuser.dat files and then no details when the file is newish and that will probably do.
I think the awk method is probably the right way to go to clean up the output - I'll keep playing :-)
Thanks - I've got almost what I wanted now by just bashing my head against the wall a few times :-)
Just some notes for me to find later ...Code:for folder in `find . -type d -iname '*.pds' -maxdepth 1` do find $folder -iname ntuser.dat -printf "%h %TY-%Tm-%Td\n" du $folder -hc | grep total | awk '{printf $1 "\n"}' done
first line finds all the directories matching "*.pds", only going down 1 level and sets up a loop to process them
next find statement searches from that folder using a case insensitive search for files called ntuser.dat When it finds them, it prints the name of the parent directory then the year, month and day on which the file was last modified
du shows the folder size(s) from $folder down; the grep command just finds the one which says "total" and the awk statement returns field 1 only (just loses the word "total" to make it a bit tidier)
I end up with output looking like this:
./spmoon.pds 2008-10-24
2.0M
./jstoppa.pds 2008-08-19
3.4M
which is probably good enough for now.

not sure about a verbose mode. will have a play when i can get to a pc

mencoder -v doesnt seem to do anything... but the program is very vocal with displaying whats going on when it is working...
There are currently 1 users browsing this thread. (0 members and 1 guests)