Command problem: Remove directory [Solved].

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
User avatar
T J Tulley
Level 5
Level 5
Posts: 558
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Command problem: Remove directory [Solved].

Post by T J Tulley »

[Using LinuxMint-8 with Windows-7 on a laptop with Pentium dual-core 2.2 GHz cpu, 4 GB RAM, 500GB hdd]

I created a folder with the command: $ mkdir /media/SATABkps; it is empty and I now want to remove it.
The commands $ rm /media/SATABkps and $ sudo rm /media/SATABkps both produce the response:
rm: cannot remove `/media/SATABkps': Is a directory

Delete is of course greyed out in the R-click menu when /media/SATABkps is selected.

Please, how do I achieve my objective?


Yours hopefully, -



Theo Tulley.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Aging Technogeek

Re: Command problem: Remove directory.

Post by Aging Technogeek »

To delete a directory from terminal you need to make the rm command recursive. Use "rm -r" and it should do the job. If not, make the command recursive and forcing by typing "rm -rf"
User avatar
T J Tulley
Level 5
Level 5
Posts: 558
Joined: Wed Jul 18, 2007 10:18 am
Location: Hull, England

Re: Command problem: Remove directory.

Post by T J Tulley »

Thanks a lot - the first one worked.
With many thanks,

Yours sincerely, -



Theo Tulley.
Locked

Return to “Beginner Questions”