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 03-27-2007, 01:35 PM   #1
ankz.upadhyay
LQ Newbie
 
Registered: Mar 2007
Location: Manchester
Distribution: Linux Mandriva 2007, Windows XP
Posts: 13

Rep: Reputation: 0
Question Delete Files through Command Window


Hi Folks

I am using Linux Mandriva 2007 version on my pc.

I have got one folder in /var/www/html and it is called gallery2.

Currently I am using rm -R filename command to delet file but when I use this command, it asks me every time confirmation for each and every file whether to delete or not. I then say "y" to confirm that and it does.

But this take aweful lot of time. so is there any other way to do so or another command?

Thanks very much.
 
Old 03-27-2007, 01:43 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
rm -Rf
--- rod
 
Old 03-27-2007, 01:55 PM   #3
ankz.upadhyay
LQ Newbie
 
Registered: Mar 2007
Location: Manchester
Distribution: Linux Mandriva 2007, Windows XP
Posts: 13

Original Poster
Rep: Reputation: 0
Hi Mate

Thanks for reply.

is this what you mean by your reply /

rm -Rf filename rod

Please do send confirmation.

Thanks.
 
Old 03-27-2007, 02:46 PM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
No, you should make that:

rm -rf [filename]

if foo is the filename, then rm -rf foo

Note: the gallery folder belongs to the "gallery2" application; if you disable it, the folder should disappear of itself. Just deleting the folder may leave you with a piece of crippled software.

Last edited by jay73; 03-27-2007 at 02:50 PM.
 
Old 03-27-2007, 02:55 PM   #5
MOS JEFF-INITELY
Member
 
Registered: Sep 2006
Distribution: Windows .. MUAHAHAHA
Posts: 66

Rep: Reputation: 15
you could also use:

shred -uf <filename>

http://unixhelp.ed.ac.uk/CGI/man-cgi?shred+1
 
Old 03-27-2007, 04:17 PM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,396
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Quote:
Originally Posted by ankz.upadhyay
Hi Mate

Thanks for reply.

is this what you mean by your reply /

rm -Rf filename rod

Please do send confirmation.

Thanks.
rm -Rf <filespec>

eg:

Code:
rm -Rf /var/www/html/gallery2/*
This will delete recursively without confirmation all files and subdirectories in gallery2, but not gallery2, itself. If you want to delete the directory as well, then
Code:
rm -Rf /var/www/html/gallery2
--- rod.
 
  


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
what is the command to delete files and folders quickly. ravi Linux - General 1 03-13-2007 01:09 PM
Need to delete directories with files using command line FTP Zombie13 Linux - Software 2 03-10-2006 11:23 PM
How to delete files that won't delete? di11rod Linux - Security 7 10-19-2005 10:14 PM
Delete command lgarcia3 Linux - Newbie 1 01-13-2005 07:58 AM
How to delete the destination files while the source files deleted in cp -u ? myunicom Linux - General 4 09-26-2003 02:13 PM


All times are GMT -5. The time now is 10:27 AM.

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