LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 04-05-2006, 08:24 PM   #1
lonecrow
Member
 
Registered: May 2005
Location: Canada
Distribution: PCLinuxOS 2007
Posts: 274

Rep: Reputation: 30
rm several files, how to answer "yes to all" ?


Ok here it is. I have about 200 files I want to rename. I use the following command

Code:
rm x*
pretty simple.

But then it asks me for EACH file if I want to remove the regular file x001, x002.....

I dont see the point of the command if I have to type "y" each times it asks me that. I must be mising something here.

I have tryied answering "all" but it doesnt work.

Anyone?
 
Old 04-05-2006, 08:33 PM   #2
sumguy231
Member
 
Registered: Apr 2004
Location: North America
Distribution: Kubuntu 7.04 - Feisty Fawn
Posts: 296

Rep: Reputation: 30
Why are you using rm (delete) to rename files instead of mv? Did you mean 'remove'? Anyway, use the -f option. (Force deletion without promtping. Be careful with this!)
Next time you need help with the usage of a command, type 'man <command>' for a manual.

Last edited by sumguy231; 04-05-2006 at 08:34 PM.
 
Old 04-05-2006, 09:19 PM   #3
lonecrow
Member
 
Registered: May 2005
Location: Canada
Distribution: PCLinuxOS 2007
Posts: 274

Original Poster
Rep: Reputation: 30
lol

sry I meant remove!!!!

Thanks, didnt know that -f was actually doing it without asking

Thanks a lot and sorry again!
 
Old 04-05-2006, 09:26 PM   #4
sumguy231
Member
 
Registered: Apr 2004
Location: North America
Distribution: Kubuntu 7.04 - Feisty Fawn
Posts: 296

Rep: Reputation: 30
Don't apologise.
 
Old 04-06-2006, 03:15 AM   #5
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
i like to use -v aswell, it outputs the files it's deleting line by line, lets me know how it's doing and whether it's hung on a large file or something

Like stated
Code:
man <command>
gives you all the useful options for a command.
 
  


Reply



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
How to "cp" or "rm" or "tar" all the files except a certain file? cqmyg5 Slackware 7 04-07-2006 02:45 PM
add "Artist" and "Album Title" to mp3 files powah Linux - Software 2 04-05-2005 03:04 AM
why iam getting problems like "...too many files opened" or "segmentation fault" naren_0101bits Linux - Newbie 2 07-19-2004 12:20 PM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM
"ifcfg-ethx" and "network-functions" files peok Linux - Networking 12 08-13-2003 06:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:05 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
Open Source Consulting | Domain Registration