Find missing files but with same file name

Ralf Mardorf silver.bullet at zoho.com
Sun May 22 05:44:29 UTC 2016


On Sat, 21 May 2016 14:59:03 -0700, rikona wrote:
>True, I use fslint a lot - good program. Is there a way to get the
>data sent to a file rather than displayed in the GUI?

Yes, as already shown by a previous mail.

Assumed you have got several directories with pictures on the Desktop,
e.g.

~/Desktop/pics_1
~/Desktop/pics_2
~/Desktop/pics_3

then you could run

$ /usr/share/fslint/fslint/findsn ~/Desktop/

to get a list with identical file names.

$ /usr/share/fslint/fslint/fslint --help
File system lint.
A collection of utilities to find lint on a filesystem.
To get more info on each utility run 'util --help'.

findup -- find DUPlicate files
findnl -- find Name Lint (problems with filenames)
findu8 -- find filenames with invalid utf8 encoding
findbl -- find Bad Links (various problems with symlinks)
findsn -- find Same Name (problems with clashing names)
finded -- find Empty Directories
findid -- find files with dead user IDs
findns -- find Non Stripped executables
findrs -- find Redundant Whitespace in files
findtf -- find Temporary Files
findul -- find possibly Unused Libraries
zipdir -- Reclaim wasted space in ext2 directory entries

$ man fslint | grep -A11 PARAMETERS
PARAMETERS
       If [PATHS] are specified, they become the default search path,
       otherwise the current directory  becomes the default.

       -f     always print full paths even if only a single path is
              specified

       -r     turn OFF recursion

       --version
              Display the fslint version and exit

       --help Display help for tool specific options


On Sat, 21 May 2016 14:59:29 -0700, rikona wrote:
>Thursday, May 19, 2016, 8:56:55 AM, Karl wrote:
>> LIST="/tmp/list.$$"  
>>          echo "$d/$i $H" >> $LIST
>sort -k 2,3 $LIST >> $LIST.sorted
>> uniq -f 1 -u $LIST.sorted > $LIST.unique  
>> sort -k 3 $LIST.unique | cut -d\  -f1  
>> rm $LIST.sorted
>> rm $LIST.unique
>> rm $LIST  
>
>Doesn't this remove the file with the unique names?

No, Karl's script does generate those files quasi as buffer for the
script. The files include lists of your files, but they aren't your
files. JFTR you could make /tmp a tmpfs, then everything in /tmp isn't
written to the hard disk, but instead to RAM. This makes usage of /tmp
much faster. The /tmp directory is aimed for "temporarily" files, such
as the files Karl's generated.

Regards,
Ralf





More information about the ubuntu-users mailing list