LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2004, 07:47 PM   #1
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Rep: Reputation: 35
how to do yes to all when deleting a dir recursively


hi. i want to rm a directory but don't waht to have to click y enter when it prompts me about all the files inside. What option would add to rm to make it say yes to all?
 
Old 12-01-2004, 07:53 PM   #2
65_289
Member
 
Registered: May 2002
Distribution: Ubuntu 5.04, Kanotix
Posts: 163

Rep: Reputation: 30
Try rm -rf <directory name here>
 
Old 12-01-2004, 08:01 PM   #3
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
thanks, that was my idea but i wasn't sure.
 
Old 12-01-2004, 08:01 PM   #4
mikeyt_333
Member
 
Registered: Jun 2001
Location: Up in the clouds
Distribution: Fedora et al.
Posts: 353

Rep: Reputation: 30
the -i flag is also set to do this, it's in your .profile or /etc/profile I believe, but can't remember. This normally only happens as root though, and I'd leave it so you don't go destroying something you don't want to.
 
Old 12-01-2004, 08:03 PM   #5
dr_zayus69
Member
 
Registered: Sep 2004
Location: western massachusetts
Distribution: fedora core 3, Suse 10
Posts: 877

Original Poster
Rep: Reputation: 35
while on the subject of removing. I have a tar file i want to remove. When i go to rm it i can hit tab to complete the name. I can see it when i do ls but when i try to rm it it says no file or dir exist
 
Old 12-01-2004, 11:39 PM   #6
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
There may be spaces at the end of the filename or something. Shell globbing can work nicely here, e.g. if the file starts with foobar, you can do rm -i foobar * (the -i is so you don't accidentally delete something else starting with foobar).
 
Old 12-02-2004, 03:42 AM   #7
LasseW
Member
 
Registered: Oct 2004
Distribution: Fedora 7, OpenSuse 10.2
Posts: 108

Rep: Reputation: 15
You can temporarily get rid of the questions if you have an aliased rm. Type alias to see if this is so. The do

unalias rm

to restore the original bash rm command. Next time you login rm will ask for confirmation again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lowercase recursively cubax Linux - General 6 05-29-2005 05:20 PM
Recursively deleting ".directory" Frank616 Linux - Software 2 03-26-2005 12:58 AM
Installing Fedora without deleting home dir eggi Fedora - Installation 2 07-17-2004 04:50 PM
howto make a dir shared that is not in my home dir Schmurff Linux - Newbie 2 06-19-2004 08:54 PM
krecipes and ./configure -with-qt-dir=DIR disco rugby Linux - Software 4 06-13-2004 10:06 PM


All times are GMT -5. The time now is 05:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration