ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: ecacarva on July 18, 2024, 02:06:26 PM

Title: Subdiretory in Linux
Post by: ecacarva on July 18, 2024, 02:06:26 PM
Hello I am trying to examine metadata files of a system in Ubuntu server, it has a lot of subdirectories in many levels, so I need to see metadata of all files.
Tryed to use exiftool -list_dir * but Only information about the first level directory appears.
Anybody would help please?
Title: Re: Subdiretory in Linux
Post by: StarGeek on July 18, 2024, 02:10:50 PM
Add the -r (-recurse) option (https://exiftool.org/exiftool_pod.html#r-.--recurse).
Title: Re: Subdiretory in Linux
Post by: ecacarva on July 18, 2024, 02:56:42 PM
Did is using command:
exiftool -list_dir -r * with this structure:

Agendamento (dir)
   |----Subdir1
        |--- file 1
        |--- file 2
        |--- file 3
   |----file1
   |----file2
Banco
   |----Subdir1
   |----file1
   |----file2

Shows:
======== Agendamento
ExifTool Version Number         : 12.89
File Name                       : Agendamento
Directory                       : .
File Size                       : 4.1 kB
File Modification Date/Time     : 2024:07:18 14:37:06-03:00
File Access Date/Time           : 2024:07:18 14:37:09-03:00
File Inode Change Date/Time     : 2024:07:18 14:37:06-03:00
File Permissions                : drwxrwxr-x
File Type                       : DIR
File Type Extension             :
======== Banco
ExifTool Version Number         : 12.89
File Name                       : Banco
Directory                       : .
File Size                       : 4.1 kB
File Modification Date/Time     : 2016:08:09 13:33:25-03:00
File Access Date/Time           : 2024:07:17 16:01:04-03:00
File Inode Change Date/Time     : 2018:08:10 13:19:17-03:00
File Permissions                : drwxrwxr-x
File Type                       : DIR
File Type Extension             :
Title: Re: Subdiretory in Linux
Post by: StarGeek on July 18, 2024, 04:08:21 PM
Hmmm... It looks like the -list_dir option (https://exiftool.org/exiftool_pod.html#list_dir) doesn't recurse. And this is only the second time that option has been mentioned here in the forums, with the first being from Phil right after the option was added.

This will require Phil's attention.

On my Windows system, running
exiftool -list_dir *
returns output for every file in that directory, not just directories. I'm not sure if that is intended behavior or not.
Title: Re: Subdiretory in Linux
Post by: Phil Harvey on July 18, 2024, 06:57:23 PM
-list_dir effectively treats directories as files, so they are not recursed into.

- Phil