Linux file being used is how to recover accidentally deleted.

1, lsof -a /data/test.txt   # lsof -a view less by using this file

 

2,  lsof | grep the Delete     #lsof can view all running processes, grep to filter out deleted delete.

 

3, remember the process number " 9903 "

4, LL / proc / 9903 / fd   #fd file descriptor, process ID 9903

 

5, CAT / proc / 9903 / fd / 4  # can view deleted files

. 6, CAT / proc / 9903 / FD /. 4> /data/test.txt  # test.txt replace files copied to see / data / under Lane

Guess you like

Origin www.cnblogs.com/alexlv/p/12125219.html