|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Vi Created empty file
Hi,
While creating a file by vi by mistake I created a file with empty name. Please tell me how to delete it |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Code:
rm filename |
| Sponsored Links | ||
|
|
#4
|
|||
|
|||
|
Thanks elixir I tried it , but showing below message Code:
Code:
rm -i \177 rm: 177 non-existent |
| Sponsored Links | |
|
|
#5
|
||||
|
||||
|
Try: Code:
rm -i $'\177' |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
still same error Code:
Code:
user@PROD2>>rm -i $'\177' rm: $\177 non-existent |
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Try to identify the file via inode number and delete it that way: Code:
$ touch ' '
$ ls -i
4907244 4907245 file1.txt 4907246 file2.txt
$ find . -inum 4907244 -exec rm {} \;
$ ls -i
4907245 file1.txt 4907246 file2.txt
$I created a file with a space as name. ls -i gave me the inode number (the number without a filename behind it) and I used find to delete it. |
| The Following 3 Users Say Thank You to cero For This Useful Post: | ||
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to delete core file (file created due to apps crashed) | s3270226 | Homework & Coursework Questions | 6 | 04-07-2011 12:13 PM |
| perl script to check if empty files are created and delete them and run a shell script | hussa1n | Shell Programming and Scripting | 2 | 06-26-2010 09:34 PM |
| While trying to do ssh without password, rsa key file is created as empty. | nibiru78 | AIX | 2 | 05-19-2010 06:12 PM |
| Getting same exit status for empty and non empty file | mavesum | UNIX for Dummies Questions & Answers | 4 | 12-03-2008 08:59 AM |
| How to empty a file(already created) | laknar | Shell Programming and Scripting | 4 | 07-04-2007 01:00 PM |
|
|