Whamcloud - gitweb
LU-16605 lfs: Add -n option to fid2path
[fs/lustre-release.git] / lustre / doc / lfs-fid2path.1
1 .TH lfs-fid2path 1 "2018-11-24" Lustre "user utilities"
2 .SH NAME
3 lfs-fid2path \- print the pathname(s) for a file identifier
4 .SH SYNOPSIS
5 .BR "lfs fid2path "
6 [\fI\,OPTION\/\fR]... <\fI\,FSNAME\/\fR|\fI\,MOUNT_POINT\/\fR> <\fI\,FID\/\fR>...
7 .SH DESCRIPTION
8 .B lfs fid2path
9 maps a numeric Lustre File IDentifier (FID) to one or more pathnames that
10 have hard links to that file.  This allows resolving filenames for FIDs used
11 in console error messages, and resolving all of the pathnames for a file
12 that has multiple hard links.  Pathnames are resolved relative to the
13 .I MOUNT_POINT
14 specified, or relative to the filesystem mount point if
15 .I FSNAME
16 is provided.
17 .SH OPTIONS
18 .TP
19 \fB\-0\fR, \fB\-\-print0\fR
20 Print the full pathname, followed by a NUL character instead of the newline character.
21 .TP
22 \fB\-f\fR, \fB\-\-print\-fid\fR
23 Print the FID with the path.
24 .TP
25 \fB\-c\fR, \fB\-\-print\-link\fR
26 Print the current link number with each pathname or parent directory.
27 .TP
28 \fB\-l\fR, \fB\-\-link\fR=\fI\,LINK\/\fR
29 If a file has multiple hard links, then print only the specified LINK,
30 starting at link 0.  If multiple FIDs are given, but only one
31 pathname is needed for each file, use
32 .BR "--link=0" .
33 .TP
34 \fB\-n\fR, \fB\-\-name\fR
35 Print only the filename instead of whole pathname
36 .SH EXAMPLES
37 .TP
38 .B $ lfs fid2path /mnt/testfs [0x200000403:0x11f:0x0]
39 /mnt/testfs/etc/hosts
40 .TP
41 .B $ lfs fid2path -0 /mnt/lustre 0x200000401:0x6:0x0 | xargs --null
42 /mnt/lustre/Test_
43 .br
44  file /mnt/lustre/Link_
45 .br
46  file
47 .TP
48 .B $ lfs fid2path -n /mnt/testfs [0x200000403:0x11f:0x0]
49 hosts
50 .SH SEE ALSO
51 .BR lfs (1),
52 .BR lfs-getstripe (1),
53 .BR lfs-path2fid (1),
54 .BR llapi_fid2path (3),
55 .BR lustre (7)