Idiot unix question
#1
Scooby Regular
Thread Starter
Join Date: Sep 2001
Location: Kingston ( Surrey, not Jamaica )
Posts: 4,670
Likes: 0
Received 0 Likes
on
0 Posts
This has been doing my head in .. I know how to do this, but have a mental block on or something...
Have a file in / with no name , but size 200000k . I have found that the filename is made up of control characters: ^?^?^?^?^?^? so can list it ( using shell tab function ) but can't delete it !
Help, let me do this and then I can get on with the 10^7 things that I should be doing
Steve
#3
If you ever get this again and easy way to remove the file is something like this:-
rm -ir *
this is an interactive remove, so you can say y/n to each file.
As long as you don't have too many files in the directory it should be pretty quick to find and remove the file.
There are other ways, but most require lots of backslashes or a bit of code, so this way is fairly elegant.
rm -ir *
this is an interactive remove, so you can say y/n to each file.
As long as you don't have too many files in the directory it should be pretty quick to find and remove the file.
There are other ways, but most require lots of backslashes or a bit of code, so this way is fairly elegant.
#4
Scooby Regular
That'll work most of the time. Consider a file called "-r" though, and under some shells that'll give you a fright when you realise the shell re-orders the arguments before they get passed to rm(1), putting it first I use a "perl -e 'unlink()' for stuff like that.
Steve.
Steve.
Thread
Thread Starter
Forum
Replies
Last Post
Brzoza
Engine Management and ECU Remapping
1
02 October 2015 05:26 PM