i was curious if vhashify cleaned up after itself (delete orphaned
instances of files in hash directory), and it appears it doesn't. these
commands should do the job. well, technically this just lists files with a
hardlink count of 1 and prints the total size in bytes of all listed files
on the last line (so you know how much space you are saving).
find /etc/vservers/.defaults/vdirbase/.hash/ -type f -printf "%n %s %p\n" |
grep '^1[[:space:]]' | awk '{ sum += $2; print $3 } END { print sum }'
to delete those listed files, add to the end:
| while read FILE; do rm -f ${FILE}; done
does anybody see any problem with my logic?
corey
-- undefined@pobox.com _______________________________________________ Vserver mailing list Vserver@list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserverReceived on Wed Sep 6 07:29:48 2006