Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: bash/fish 命令打印文件的绝对路径
假设我在一个目录/usr/temp/foo中,其中有一个名为bar.txt
/usr/temp/foo
bar.txt
如何获得完整路径bar.txt?(应该是/usr/tem/foo/bar.txt)
/usr/tem/foo/bar.txt
尝试:
readlink -f bar.txt
额外的文字让你很开心。