Easiest way to get full path of a directory from the Pid/Cid

What is currently the easiest way to find the full path of an EOS directory given its pid/cid?

I have a list of files that are single replica that I dumped from eos-ns-inspect. I’d like to compile a list of directories that contain these files from the “container=” field in this list. And of course it would be more helpful if I had the full directory path and not just the name.

Thanks.

Hi Dan,

You can use the id or the hex id with the fileinfo command:

[esindril@esdss000 build_clang_ninja]$ eos fileinfo /eos/dev/replica/
  Directory: '/eos/dev/replica/'  Treesize: 11347447
  Container: 4  Files: 5  Flags: 42777
Modify: Wed Oct  7 01:24:27 2020 Timestamp: 1602026667.359557611
Change: Sun Sep 27 22:40:46 2020 Timestamp: 1601239246.784285622
Sync  : Wed Oct  7 01:24:27 2020 Timestamp: 1602026667.359557611
Birth : Thu Jan  1 01:00:00 1970 Timestamp: 0.000000000
  CUid: 58602 CGid: 1028 Fxid: 0000000b Fid: 11 Pid: 3 Pxid: 00000003
  ETAG: b:1602026667.359
[esindril@esdss000 build_clang_ninja]$ eos fileinfo pid:11
  Directory: '/eos/dev/replica/'  Treesize: 11347447
  Container: 4  Files: 5  Flags: 42777  Clock: 163b8ac50736ddb9
Modify: Wed Oct  7 01:24:27 2020 Timestamp: 1602026667.359557611
Change: Sun Sep 27 22:40:46 2020 Timestamp: 1601239246.784285622
Sync  : Wed Oct  7 01:24:27 2020 Timestamp: 1602026667.359557611
Birth : Thu Jan  1 01:00:00 1970 Timestamp: 0.000000000
  CUid: 58602 CGid: 1028 Fxid: 0000000b Fid: 11 Pid: 3 Pxid: 00000003
  ETAG: b:1602026667.359

Cheers,
Elvin

I expected it was something like that, but that isn’t documented as far as I can see in the EOS docs or in the usage statement:

Usage: fileinfo <identifier> [--path] [--fid] [--fxid] [--size] [--checksum] [--fullpath] [--proxy] [-m] [--env] [-s|--silent]
  Prints file information for specified <identifier>
  <identifier> = <path>|fid:<fid-dec>|fxid:<fid-hex>|inode:<inode-dec>
Options:
  --path        : filters output to show path field
  --fid         : filters output to show fid field
  --fxid        : filters output to show fxid field
  --size        : filters output to show size field
  --checksum    : filters output to show checksum field
  --fullpath    : adds physical path information to the output
  --proxy       : adds proxy information to the output
  --env         : prints information in OucEnv format
  -m            : prints single-line information in monitoring format
  -s | --silent : silent - used to run as internal command

 Remarks:
  Filters stack up and apply only to normal display mode.
  Command also supports JSON output.


Dan Szkola
FNAL

I’ve added this piece of info to the help. I will be in 4.8.23.
https://gitlab.cern.ch/dss/eos/-/commit/8c78d614ed07314069f69fcde25b50b7e032f865

Cheers,
Elvin