Announcement

Collapse
No announcement yet.

Trying to find three hidden files in a large collection of files? Or I'm I seeing something else?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Trying to find three hidden files in a large collection of files? Or I'm I seeing something else?

    I have a media folder with dozens of directories and hundreds of files. I want a "clean" list of the full paths of the mp4 files, so I used:
    Code:
    find ~+ -type f -name "*mp4"
    which appears to work. However, piping through "wc -l" I get a count exactly 3 higher than when counting the files with just
    Code:
    ls -R |grep mp4 |wc -l
    Running the find command through sort revealed three apparently "hidden" files, all named ".mp4". These all list as just ".mp4" - no path included.

    On the surface, this indicates to me that these three files (if that's what they are) are in the root directory where I ran the command, but that's not possible since they all have the same name. So either the path of those files is not showing for an unknown reason or something else is happening. I'm also seeing the same behavior on one other directory, but not every directory.


    Please Read Me

    #2
    .mp4 files with a newline in the name? Or some other non-printing character, which separates the .mp4 from the path when you apply the sort?
    Regards, John Little

    Comment


      #3
      Originally posted by jlittle View Post
      .mp4 files with a newline in the name? Or some other non-printing character, which separates the .mp4 from the path when you apply the sort?
      That seem to be the answer and all in one location:

      Code:
      /mnt/pool/@Movies/Planes Trains And Automobiles/Featurettes/A Tribute to John Candy-featurette
      .mp4
      /mnt/pool/@Movies/Planes Trains And Automobiles/Featurettes/Deleted Scene-deleted
      .mp4
      /mnt/pool/@Movies/Planes Trains And Automobiles/Featurettes/Getting There is Half the Fun-featurette
      .mp4
      From Dolphin:
      Click image for larger version  Name:	Screenshot_20241222_154451.jpg Views:	0 Size:	29.0 KB ID:	684496
      Looks like a carriage return. Can't imagine ​how that happened but deleting the CR fixed the anomaly.

      The "sort" pushed them to the bottom of the list so it was not obvious to me what was happening.

      Thanks, as always!

      Please Read Me

      Comment

      Working...
      X