我有一堆处于同一级别的目录,并希望根据其中内容(递归)的最后修改日期对它们进行排序。但是,在 nautilus 中,看起来目录的“上次修改日期”只有在内部创建新文件时才会更新。
无论如何要显示这些目录的递归“上次修改日期”?
编辑:我只需要知道最近一分钟的日期。所以我采用了 Stéphane Chazelas 的解决方案,稍作修改以减少混乱:
find . -mindepth 2 -type f -printf '%TF %TH:%TM/%P\0' |
LC_ALL=C sort -zt/ -k2,2 -k1,1r |
LC_ALL=C sort -t/ -zmsuk2,2 |
LC_ALL=C sort -z |
cut -zd/ -f1,2 | tr '\0/' '\n\t'
Run Code Online (Sandbox Code Playgroud) 我经常使用 sshfs 挂载远程目录,使其显示为本地目录:
sudo sshfs -o allow_other myname@server:/remote/path /mnt/remote/
Run Code Online (Sandbox Code Playgroud)
有时连接可能会中断,因此/mnt/remote
会显示为空。如果我尝试重新运行上面的命令,我会得到
'/mnt/remote:' Transport endpoint is not connected'
Run Code Online (Sandbox Code Playgroud)
但是我无法(强制)卸载该目录:
sudo umount (-f) /mnt/remote
umount: /mnt/remote: target is busy
Run Code Online (Sandbox Code Playgroud)
我想知道如何在不重新启动计算机的情况下重新挂载目录?