How to get full path of a file?

后端 未结 30 3318
走了就别回头了
走了就别回头了 2020-12-02 03:22

Is there an easy way I can print the full path of file.txt ?

file.txt = /nfs/an/disks/jj/home/dir/file.txt

The

30条回答
  •  青春惊慌失措
    2020-12-02 03:49

    On Windows:

    • Holding Shift and right clicking on a file in Windows Explorer gives you an option called Copy as Path. This will copy the full path of the file to clipboard.

    On Linux:

    • You can use the command realpath yourfile to get the full path of a file as suggested by others.

提交回复
热议问题