Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I want to delete a particluar directory in a read only file system. How to mount its parent directory it in read write mode so that I can delete tha. I tried different things after googling. But could not succeed. For some options it say, block device required.

share|improve this question
    
Maybe you should provide us the commands that you tried. –  cYrus Sep 30 '10 at 18:33
    
I tried this: " sudo mount -rw ./ ./" –  pineapple Sep 30 '10 at 18:41
    
I doubt mount works that way, as far as I know its syntax is: mount -t type device dir. –  cYrus Sep 30 '10 at 19:20

2 Answers 2

up vote 3 down vote accepted

I suppose you would like to remount the /usr file system read-write:

$ sudo mount -o remount,rw /usr

Just change /usr above by the mount point you would like to remount.

share|improve this answer
    
And a simple way to find the mount point for the filesystem containing a particular file is df particular/file. –  Gilles Sep 30 '10 at 23:32
    
The command mentioned in answer gives error: unknown special file or file system –  pineapple Oct 1 '10 at 1:29
    
Would you like please to complete your question with the following information: the path to the folder you would like to delete, the output of the "df" command or the "mount" command, and the exact command you have executed to receive the error you have just mentioned in your last command. Many thanks. –  uloBasEI Oct 1 '10 at 6:19

The key is that you need to do this on a mount point basis. There is no easy way to do this for just a portion of a mounted filesystem. To get a list of the currently mounted filesystems, try

df

For one problem that the ability to do this would lead to, consider hard links. If a file is linked in one directory that is read-only and another that is read-write, what should the permissions on that file be?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.