bash查询某文件的绝对路径

阅读量: searchstar 2020-06-05 15:13:47
Categories: Tags:

realpath即可。

searchstar@searchstar-PC:/tmp/test$ ls
chroot  test2.sh  test3.sh  test4.sh  test5.sh  test.sh
searchstar@searchstar-PC:/tmp/test$ realpath test3.sh 
/tmp/test/test3.sh