Results 1 to 3 of 3

Thread: Find missing Files in directory

  1. #1
    Join Date
    Mar 2007
    Beans
    32

    Find missing Files in directory

    I have about 1300 pictures that I am trying to organize.
    They are numbered sequentially eg. ( 0001.jpg -> 1300.jpg )
    The problem is that I seem to be missing some, when I highlight all of them, the number it shows is something around 1291 files.

    Is there a fast way to be able to scan the directory to see which ones I am missing? Other than to do it manually, which would take a long time.

  2. #2
    Join Date
    May 2008
    Location
    Eugene, OR, USA
    Beans
    435

    Re: Find missing Files in directory

    Code:
    for i in $(seq -w 1 1300); do
        [ ! -f $i.jpg ] && echo $i.jpg
    done
    The above code will check all file names from 0001.jpg through 1300.jpg and print the names of the files in that sequence that are not there.
    Hal Pomeranz, Deer Run Associates
    [[ Various Linux/Unix related documents ]]
    [[ Command-Line Kung Fu blog ]]

  3. #3
    Join Date
    Mar 2007
    Beans
    32

    Re: Find missing Files in directory

    Thanks, that did it, I found the missing ones.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •