View Single Post
  #8   (View Single Post)  
Old 26th April 2010
vermaden's Avatar
vermaden vermaden is offline
Administrator
 
Join Date: Apr 2008
Location: pl_PL.lodz
Posts: 1,056
Default

Quote:
Originally Posted by IdOp View Post
Ah, ok. Glad it's not a bug. (That kind of thing can be hard to see after staring at it long enough.)
After using this script for a while, I encountered only one 'unwanted' behavior, when file name uses some strange chars (after encoding problems, etc), name of that file is not printed, cut(1) yells about incorrect byte sequence.

Maybe I should involve some filter in the middle before cut to make it print it, but the name will be at most only 'close' to the real one, and b instructions will not work.

Other solution may be first find all files with incorrect names, print them on the screen telling that we will omit them as long as they have 'bad' characters.

It would be also great to have it simplified with directories, that and that dirs are identical, but such comparison would take ages to compute, and even more if there are 3 or more of duplicates, but maybe I will find some nice way to compare directories ... but I have absolutely no idea how to exclude more in depth directories that are in same dirs for example, to not produce useless output, like that:

Code:
count: 2
  /home/dir1
  /home/backup/dir1

count: 2
  /home/dir1/include
  /home/backup/dir1/include
Generally its little PITA reading output of that script from about 1TB data, but I do not have currently any ideas how to improve it
__________________
religions, worst damnation of mankind
"If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds

Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”.
vermaden's: links resources deviantart spreadbsd
Reply With Quote