serverfault上的答案 Using commands like cp and mv, use of the trailing slash in the destination acts as a bit of a safety net, since it forces the final path component to be interpreted as a directory. Compare mv myfile /some/path to mv myfile /some/path/ -- if /some/path does not exist, the first version will create a file, while the second version will fail with an error. If /some/path exists but is a file, the first version will replace it, while the second version will again fail with an error.
serverfault上的答案
Using commands like cp and mv, use of the trailing slash in the destination acts as a bit of a safety net, since it forces the final path component to be interpreted as a directory. Compare mv myfile /some/path to mv myfile /some/path/ -- if /some/path does not exist, the first version will create a file, while the second version will fail with an error. If /some/path exists but is a file, the first version will replace it, while the second version will again fail with an error.
后面加斜杠,强调是一个目录,/tmp/不存在会报错,如果不加斜杠,命令会给你创建一个/tmp文件。所以为了严谨和安全,总是加上斜杠吧!