Unable to delete file with name starting with '*'

katsu

New Member
Joined
Sep 25, 2022
Messages
8
Reaction score
3
Credits
72
Hello guys, I have accidentally created "*l" file and now I cannot get rid of that. Do somebody know how to deal with it ?

1680347795693.png
 


rado84

Well-Known Member
Joined
Feb 25, 2019
Messages
676
Reaction score
547
Credits
3,969
1. Try as root (sudo).
2. Try renaming the file first.
3. Try Live distro, such as Linux Mint, to access the location of the file and delete it when your system isn't running.
Also make sure you didn't make the file immutable by accident: sudo chattr -i [filename].
 

f33dm3bits

Gold Member
Gold Supporter
Joined
Dec 11, 2019
Messages
5,925
Reaction score
4,414
Credits
43,540
Just open a terminal and change the the location where the file is and run the following command.
Code:
rm \*l
 
OP
katsu

katsu

New Member
Joined
Sep 25, 2022
Messages
8
Reaction score
3
Credits
72
@f33dm3bits , @gvisoc , @rado84 , thx for your responses, I have dealt with that pretty randomly by moving all other files from directory with this *l file and so right after that, that file has disappeared. I think neither of your suggestions would resolve it because I accidentally created that file by using C compilator GCC, so it wasn't regular file. Even ls wasn't able to display that file. But @f33dm3bits your suggestion of using \ sounds good to me, I have forgot about use backslash.
 
MALIBAL Linux Laptops

Linux Laptops Custom Built for You
MALIBAL is an innovative computer manufacturer that produces high-performance, custom laptops for Linux.

For more info, visit: https://www.malibal.com

Members online


Latest posts

Top