1>查找谁在使用文件系统
sudo mount -o loop CentOS-6.2-x86_64-bin-DVD1.iso /mnt/dir/
tail -f /mnt/dir/TRANS.TBL
sudo umount /mnt/dir
lsof /mnt/dir
kill -9 pid
sudo umount /mnt/dir
touch test
rm -f test
lsof | grep test
cat /proc/5433/fd/3
sudo mount -o loop CentOS-6.2-x86_64-bin-DVD1.iso /mnt/dir/
tail -f /mnt/dir/TRANS.TBL
sudo umount /mnt/dir
lsof /mnt/dir
kill -9 pid
sudo umount /mnt/dir
touch test
echo my test file > test
md5sum test 或( sha1sum test )
rm -f test
lsof | grep test
cat /proc/5433/fd/3
cat /proc/5433/fd/3 > test
md5sum test 或 ( sha1sum test ) 证明文件内容相同
本文介绍如何通过挂载ISO文件并使用lsof工具来查找正在使用文件系统的进程,进而安全卸载。此外,还详细展示了如何恢复已删除的小文件,包括利用文件描述符进行内容恢复的方法。
1249

被折叠的 条评论
为什么被折叠?



