我想转换/foo/bar/..到/foo
/foo/bar/..
/foo
是否有一个bash命令执行此操作?
编辑:在我的实际案例中,目录确实存在.
unix linux bash shell
bash ×1
linux ×1
shell ×1
unix ×1