I have a lot of DVD images on line, and was trying to locate one of them.
Use locate(1)
$ locate CentOS-5
/data1/Torrents/CentOS/CentOS-5.0-i386-bin-DVD
# a directory
/data1/Torrents/CentOS/CentOS-5.0-i386-bin-DVD/md5sum.txt # a checksum
/data1/Torrents/CentOS/CentOS-5.0-i386-bin-DVD/sha1sum.txt #
another checksum
# but no .iso
Use find(1)
$ find /data1/Torrents -name CentOS-5\*
/data1/Torrents/CentOS/CentOS-5.0-i386-bin-DVD
/data1/Torrents/CentOS/CentOS-5.0-i386-bin-DVD/CentOS-5.0-i386-bin-DVD.iso
It is really there.
Do some more investigation. See what can be located in /data1/Torrents:
locate -r '\.iso$' | sed -n "s:/data1/Torrents:.:p" > /tmp/locate_iso
See what can be found in /data1/Torrents Use printf function of
find(1) to display file size and name. Sort the results by size,
because this is beginning to look like an interesting parameter.
$ cd /data1/Torrents
$ find . -name \*.iso -printf "%s %p\n" | sort -n > /tmp/find_iso
See what these two files do not have in common: Use Fgrep to
determine common elements, and -v flag to invert this.
$ grep -F -f locate_iso find_iso > located_iso # files found
and located
$ grep -F -f locate_iso -v find_iso > unlocated_iso # files found
and not located
Use the editor of your choice to examine these files, or sample a
couple of lines:
$ tail -2 located_iso
2083522560 ./Ubuntu-ultimate/ubuntu-ultimate-1.4-dvd/ubuntu-ultimate-1.4-dvd.iso
2110509056 ./CentOS/centos-4.3-alpha-bindvd/centos-4.3-alpha-bindvd.iso
$ head -2 unlocated_iso
2314237952 ./CentOS/CentOS-4.4-i386-binDVD/CentOS-4.4-i386-binDVD.iso
2575697920 ./bordeaux-source/FC-5-SRPMS-DVD.iso
My HP pocket calculator tells me that 2110509056 = 2^30.97 and
2314237952 = 2^31.11 There seems to be a magic size of file 2^31 bytes
above which locate doesn't work.
Maybe this is a magic 2GB barrier caused by an old version of locate?
Google exercise does not reveal any clues.
$ locate --version
Secure Locate 2.7 - Released January 24, 2003
That's how I just spent Friday afternoon. If anybody wants more
explanation of the command-line stuff, I will supply it.
Late-breaking news, from another Google exercise, this time looking
for "updatedb" not "locate" or "slocate".
"GNU findutils does have largefile support as of 4.1.5."
Bah.
carl
--
carl lowenstein marine physical lab u.c. san diego
[EMAIL PROTECTED]
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list