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.
我需要一台远程机器来打印托管在其上的给定文件的绝对路径,所以我这样做:
ssh me@remote.host.net "echo '$(pwd)/file.txt'"
太糟糕了,这种方式在本地而不是远程pwd进行评估。我怎样才能做到这一点?
pwd
翻转引号:
ssh me@remote.host.net 'echo "$(pwd)/file.txt"'