Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Idiot unix question

Thread Tools
 
Search this Thread
 
Old Jul 1, 2002 | 02:29 PM
  #1  
stevem2k's Avatar
stevem2k
Thread Starter
Scooby Regular
 
Joined: Sep 2001
Posts: 4,670
Likes: 0
From: Kingston ( Surrey, not Jamaica )
Post


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
Reply
Old Jul 1, 2002 | 02:35 PM
  #2  
stevem2k's Avatar
stevem2k
Thread Starter
Scooby Regular
 
Joined: Sep 2001
Posts: 4,670
Likes: 0
From: Kingston ( Surrey, not Jamaica )
Post

Don't worry, fixed it now.

Steve
Reply
Old Jul 1, 2002 | 07:34 PM
  #3  
Sheepsplitter's Avatar
Sheepsplitter
Scooby Regular
 
Joined: Nov 2001
Posts: 1,072
Likes: 0
Post

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.

Reply
Old Jul 2, 2002 | 10:01 AM
  #4  
stevencotton's Avatar
stevencotton
Scooby Regular
 
Joined: Jan 2001
Posts: 2,710
Likes: 1
From: behind twin turbos
Post

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.
Reply
Old Jul 2, 2002 | 07:13 PM
  #5  
orbv's Avatar
orbv
Scooby Regular
 
Joined: Apr 2001
Posts: 1,103
Likes: 0
From: Hants
Post

Hours of fun creating files called '-rf *' on the root partition. Try 'rm -i -- *'.
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
KAS35RSTI
Subaru
27
Nov 4, 2021 07:12 PM
slimwiltaz
General Technical
20
Oct 9, 2015 07:40 PM
IanG1983
Wheels, Tyres & Brakes
2
Oct 6, 2015 03:08 PM
Brzoza
Engine Management and ECU Remapping
1
Oct 2, 2015 05:26 PM
legb4rsk
Non Scooby Related
14
Oct 1, 2015 05:18 AM




All times are GMT +1. The time now is 01:23 AM.