Dear fellow boss:
I have a small white Linux, a little bit of trouble to ask the Boss
Practice the TAR command today to add a current month and date to the filename when you compress the file
[Email protected] log]# tar zcvf log.tar-' date +%f '. Gz.
As a result, the inverted quotation marks are written in single
Use the LS command to view the compressed file name as
Log.tardate +%f.gz
After realizing your mistake, you want to delete this file.
Results appear
[Email protected] log]# rm./log.tar-date +%f.gz
Rm:cannot Remove ./log.tar-date‘: No such file or directory<br/>rm: cannot remove
+%f.gz ': No such file or directory
You want to move to another place, you get the same hint.
Find. -name "*.gz" |xargs mv-t/tmp
Mv:cannot stat ./log.tar-date‘: No such file or directory<br/>mv: cannot stat
+%f.gz ': No such file or directory
After several setbacks ..... 10,000 characters omitted here
Then I thought I could delete it with the inode number.
So first look at the inode number of this file
[Email protected] log]# Ls-lhi.
267015-rw-r--r--1 root root 373K Sep 9 16:33 log.tardate +%f.gz
And then try
[[email protected] log]# find. -inum 267015-delete
LS view, and the results of this file are really gone.
May I ask why this is happening?
此致,敬礼 来自一位Linux小白的渴求
About Linux File Delete file when prompted no such file or directory