Not able to delete this file/directory/entry


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Not able to delete this file/directory/entry
# 1  
Old 02-22-2011
Not able to delete this file/directory/entry

Hello UNIX gurus,

I noticed this file or whatever in one of our directories, and somehow I am not able to proceed with my work, without deleting this one.

.insert--- 1 siebload intrface 0 Feb 22 01:25 Testfile

I am confused, as it doesnt appear to be a file, and on doing any file operations, "rm, mv, cat" doesnt help. It just gives errors:

cat-:
"cat: cannot open Testfile"

rm-:
"Testfile: No such file or directory"

mv-:
mv: cannot access Testfile


help me guys, how do i remove this entry?

---------- Post updated at 04:39 AM ---------- Previous update was at 04:36 AM ----------

One more thing... when I did a listing like this...check the result.

$ ls | grep insert
.insertTestfile

I even tried deleting, moving the file ".insertTestfile", but in vain Smilie
# 2  
Old 02-22-2011
Check that your file is not currently in use ( man fuser )
If not in use

Check it has a standard type and that your have the required authorizations/ access rights to remove it.
Code:
id
ls -ld Testfil*

Make sure the Testfil* match only the file you want to remove

Then remove it (it should handle invisible character if some)
Code:
rm "Testfil*"

# 3  
Old 02-22-2011
MySQL thanks

thanks so much ctsgnb... there probably were some extra characters attached to it, but pre-fixed to it.

rm -f Testfil* didnt work for me.

but, rm -f *estfil* did the trick.

thanks....
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. How to Post in the The UNIX and Linux Forums

Help me, write a bash script to delete parent entry with all their child entry in LDAP UNIX server

Hi All, Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries. example: Parent is : ---------- dn: email=yogesh.kumar@wipro.com, o=wipro, o=in child is: ---------- dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Discussion started by: Chand
1 Replies

2. Shell Programming and Scripting

Bash to delete file in directory

Will the below bash delete all the "snps.ivg" in the given directory? Thank you :) find N:\all_array\Samples -maxdepth 1 -type f -name "snps.ivg" -delete (6 Replies)
Discussion started by: cmccabe
6 Replies

3. Shell Programming and Scripting

Delete File in a Directory Using a Condition

Hello, I have a directory with many files whose creation time is distributed all over the day. I need ANY 20 files per hour. So, I need 20 files for hour 00 20 files for hour 01 ... 20 files for hour 23 What I have done so far is not great. Here is the code: # get the Month a=`echo... (8 Replies)
Discussion started by: shekhar2010us
8 Replies

4. Shell Programming and Scripting

Perl: How to delete an entry from hash of lists?

I've got a hash of lists such as below: %lists = ( "111" => , "222" => , "333" => , ); How do I remove a particular entry from the list? For example if I want to remove the entry with value "10" in the "222" list? Thanks, //Juha (2 Replies)
Discussion started by: Juha
2 Replies

5. Shell Programming and Scripting

Need to delete duplicate lease entry

Hi *, I need to delete duplicate lease entries in file according to MAC/IP. I'm having tempfile which contains many lease info and need to have one entry for each IP(not more than that), if it contains more than one entry for same set, need to be deleted that entry... EX: lease... (4 Replies)
Discussion started by: SMNK
4 Replies

6. UNIX for Dummies Questions & Answers

Compare these two lines and delete the old entry

I have a unique situation here which looks easier at first but I am not able to solve it. # SSort UNIX 10/14/2005 10/13/2010 "tox" "9000/800" 16 * * * V849-6-1 # SSort UNIX 11/31/1996 11/02/2010 "tox" "9000/800" 16 * * * W237-S-2 I have a text file with two or multiple values like this and... (1 Reply)
Discussion started by: pareshan
1 Replies

7. Shell Programming and Scripting

delete entry from /etc/hosts file ?

Hi there I have a requirement where i have to globally remove a hosts file entry from all boxes e.g. 10.01.10.1 my_server1 normally for 'in-line' editing of files without passing it out to another fle and copying it back etc which is messy, Ive been using the fantastic "perl -pi... (1 Reply)
Discussion started by: hcclnoodles
1 Replies

8. Shell Programming and Scripting

Unix script to detect new file entry in directory

Hi All, I want to detect each new file coming / getting created in unix directory. When every new file came to directory, i have to get its details like its size , date and time stamp and store it into another file. Could any one please tell me , how i can achieve that? Thanks. (13 Replies)
Discussion started by: james_1984
13 Replies

9. Shell Programming and Scripting

shell script to edit file and delete entry

Can anyone provide me a shell script to edit a xml file and delete one entry. To do manually i can edit(vi editor) the file and 'dd' will delete the file.But I wiluld to know if I can do with a script. Thanks in advance Tannu (6 Replies)
Discussion started by: tannu
6 Replies

10. Shell Programming and Scripting

delete dhcp.conf entry using sed

I am trying to use sed to remove entries from my dhcpd.conf file. The form of the file is: host foo { option 1 option 2 } host bar { option 1 option 2 } I was trying to use a label like: sed -e :a -e "s/^host bar {*//g;/{/N;//ba" /etc/dhcpd.conf... (2 Replies)
Discussion started by: tizatron
2 Replies
Login or Register to Ask a Question