Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Using c shell special characters with rm command

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
NewToLinux
Posts: 71
Joined: 2017-09-17 11:30

Using c shell special characters with rm command

#1 Post by NewToLinux »

I use the c shell.

I wish to remove all the files and directories from a USB stick

There are a lot of files and directories. Many of the files and directories start with a period (I.e. they are so-called hidden files and directories.)

Firstly I cd to the stick's mount point. Then the problem is how to
use the rm command.

If I run rm -r *

I do not delete the hidden files or hidden directories.

If I run rm -r *.*

I run into problems with . (current directory) and .. (parent directory)

How can I run rm to delete all files and directories (including the
hidden files and directories) ?

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 698
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 129 times
Been thanked: 59 times

Re: Using c shell special characters with rm command

#2 Post by cds60601 »

Why not just format the USB drive...

Otherwise, use this command:

Code: Select all

man rm
And if you still need to find out more, google rm hidden files and folders
Supercalifragilisticexpialidocious

Post Reply