[plug] Find similarly named files in directories
Timothy White
weirdit at gmail.com
Sat Jan 13 13:15:47 WST 2007
>
> > I quick test shows...
> >
> > tim at linjeni:/data$ find|perl
> > -ne'm#.*(/.*)#;push@{$a{$1}},$_}foreach(%a){$#$_>0&&print"@$_\n"'|sort|uniq|wc
> >
> > $ find| sed 's/\ /:::/g' |sed -r 's/.*\/(.*)/\0 \1/'|sort -k 2|uniq
> > --all-repeated=separate -f 1| sed 's/[^ ]*$//' | sed 's/:::/\ /g'|
> > sort|uniq|wc -l
>
> I don't really think either are that clear though ;)
Well the quick test was really just to show that they basically give
the same number of results.
>
> > And the differences in the files? This char >>�<< (not sure if it'll
> > email or not) is some strange escape code. My script seemed to ignore
> > all the files with that in the path.
Well it's a single file, and directory that contain that char. They
are in an old directory copied over from a windows drive, say 3-4
years ago when I actually had windows. fsck didn't seem to complain
about the chars, so they must be legit.
A bit of poking, using Thunar and firefox reveals what they are... A
url encoded string would be %BB, which is the » character. No idea why
my terminal can't display it, as I can paste it in. Must be something
different about how it's stored, because a ls *»* doesn't show the
files. Even more strange, using thunar and renaming it so that it's
named with the correct char (») works, and fixes it all up! I wonder
if it's a conflict between encodings or something.
>
> Sounds like you need a fsck ...
Hmmm. I think I may.
Data has gone 307 days without being checked, check forced.
Ooops
No idea why it hasn't been checked. I've rebooted recently to move the
machine to another room, and it's mounted at boot time.
Hmmm, a look at my fstab shows it's set to pass 0, so no fsck... Oops,
glad I picked that up then, before I leave this machine for 12 months!
Is it possible to have "pass 3" or only 1 and 2?
Now that I've fixed up my fstab... I may reboot just so all the drives
that are long overdue, get scanned :P
Tim
--
Linux Counter user #273956
Don't email joeblogs at scouts.org.au
More information about the plug
mailing list