Failed Tar created "-M" file now can't delete
Howdy Ya'll,
I have been using Linux for a number of years and frankly this one has me stumped, but while I have some ideas on how I can fix by taking down the server, I can't take the server off line because it is a production server. There was a tar archive that failed and didn't know it. Until my /var ran out of disk space that is. Within /var there is a file name -M with a file size of 231M. At first I didn't realize it was a failed tar until I tried test extract it and discovered that it was a failed archive. I have tried to rm, shred, mv, the file but all fail because the file keeps being seen as a command option. Code:
ls -lh | more Code:
# rm -f -M Code:
# shred -uvfz -M Code:
# mv -M M Code:
tar -tvf -M Code:
# df -h No remember I can't take the server off line (It's Live Production), and I don't have any spare disk to move /var to larger pastures so any help or ideas to rid me of the blasted file would be most helpful. I just need it to not be interpreted as an option. |
One trick you can do (and be careful) is
Code:
rm -i * Usually, though, you can get rid of those sort of things with Code:
rm ./-M |
Thanks tronayne.
This one really had me stumped, never thought to use ./-M It worked like a charm Now I have much more space in my /var dir.. Now to work on my log rotation and figure out why it's isn't removing older archives... |
Another way is
Code:
rm -- -M |
Quote:
Code:
root@host# rm "-M" |
All times are GMT -5. The time now is 08:53 PM. |