How to get full path of a file?

后端 未结 30 3323
走了就别回头了
走了就别回头了 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条回答
  •  猫巷女王i
    2020-12-02 03:50

    I know that this is an old question now, but just to add to the information here:

    The Linux command which can be used to find the filepath of a command file, i.e.

    $ which ls
    /bin/ls
    

    There are some caveats to this; please see https://www.cyberciti.biz/faq/how-do-i-find-the-path-to-a-command-file/.

提交回复
热议问题