removing a directory


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers removing a directory
# 1  
Old 12-23-2003
Network removing a directory

all - I'm trying to delete this directory with no success. This was placed in my folder by a test script I wrote for beginners...

drwxr-xr-x 2 myaddress ssusr 512 Dec 22 16:10 $x+1

Here is the message I receive - I've tried every command possible to remove it:

rmdir: 0653-609 Cannot remove +1.

thanks
# 2  
Old 12-23-2003
Hi,

Do rmdir ./$x+1
# 3  
Old 12-23-2003
have you tried?

rm '$x+1'
rm \$x\+1
rm `ls`
# 4  
Old 12-23-2003
removing a directory

this is the response i received..

rmdir: 0653-609 Cannot remove ./+1.
A file or directory in the path name does not exist.
# 5  
Old 12-23-2003
Optimus - i got this message back as well:

rm: 0653-603 Cannot remove directory $x+1.
# 6  
Old 12-23-2003
Re: removing a directory

Quote:
Originally posted by da_curtain
rmdir: 0653-609 Cannot remove ./+1.
A file or directory in the path name does not exist.
rmdir ./"+1", then...
# 7  
Old 12-23-2003
What system are you using? What shell?

Also try:

rm -fr '$x+1'
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rename directory removing last characters

Hello - I was looking to write a simple script trying to rename sub-directories chopping off the last n characters. For example: In /home/myname/dir there are three sub-directories: directory1_1, directory2_2, and directory3_3. Is there a simple script to chop off the last... (4 Replies)
Discussion started by: twckfa16
4 Replies

2. UNIX for Dummies Questions & Answers

Removing directory with leading hyphen from root directory

I know that this basic question has been asked many times and solutions all over the internet, but none of the are working for me. I have a directory in the root directory, named "-p". # ls -l / total 198 <snip> drwxr-xr-x 4 root root 4096 Dec 3 14:18 opt drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: edstevens
2 Replies

3. UNIX for Dummies Questions & Answers

Removing a range of files in a directory..

Hi all, Disclosure: I am very new to Unix, but eager to learn.. I've been tasked with transferring logs to a remote server. After I've verified these logs have transferred correctly I have to remove the source files. The naming scheme is: /directory/2012.05.01 /directory/2012.05.02 ..and... (1 Reply)
Discussion started by: JD3V
1 Replies

4. Shell Programming and Scripting

help with removing files from home directory

hey there folks! I cant figure out, for the life of me, how to procede in removing alll the files in my home directory that are not owned by me. would i have to list them, but after that what do i do. or is there some way I am not aware of. my employer heard i could script in unix, but i havent... (3 Replies)
Discussion started by: Ginkosu
3 Replies

5. UNIX for Dummies Questions & Answers

removing first 7 characters of directory names

Hi, I'm relatively new to unix, and would like to change the following files in a particular directory. The files have names like: M10_90_Phcn402_3F.ab1 M10_94_Sput402_3F.ab1 M11_92_Abrg402_3R.ab1 M10_91_Cdel402_3F.ab1 M11_90_Phcn402_3R.ab1 M12_84_Sput402_3R.ab1... (4 Replies)
Discussion started by: euspilapteryx
4 Replies

6. UNIX for Dummies Questions & Answers

removing the files but not the directory

How would i rmeove all the files in the directory but still keep the directory? (5 Replies)
Discussion started by: JamieMurry
5 Replies

7. UNIX for Advanced & Expert Users

Removing all file for the particular directory

i want remove all the files from below directory Available directory foa/commprog/data foa/commprog/a foa/commprog/b mfoa/commprog/data mfoa/commprog/a mfoa/commprog/c dfoa/commprog/d There are more folders like this i want to remove the the file from only /data i need only... (3 Replies)
Discussion started by: kingganesh04
3 Replies

8. Filesystems, Disks and Memory

Removing a file from a directory

How do you remove a file named '-'? ('rm' does not work) (5 Replies)
Discussion started by: npatel
5 Replies

9. UNIX Desktop Questions & Answers

Problem Removing a Directory !!!

Hi All, When i remove a directory , the following error message comes : rm: cannot determine if this is an ancestor of the current working directory Is it something to do with the permissisons ? The path is /PBAMLftp/incoming/misc/July06 - (where i need to remove the July06 directory) And... (1 Reply)
Discussion started by: gauravsachan
1 Replies

10. Shell Programming and Scripting

Removing the oldest file in a directory

Hi all, I need your assistance in removing the oldest file in a directory. I posted the same thread 3 days back and I got the following answer ls -1 -t | tail -1 | xargs rm which is not covering the case when there are directories older than the oldest file. So, could you please... (2 Replies)
Discussion started by: pavan_movva
2 Replies
Login or Register to Ask a Question