LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 03-27-2007, 12: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, 12:43 PM   #2
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
rm -Rf
--- rod
 
Old 03-27-2007, 12: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, 01:46 PM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 133Reputation: 133
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 01:50 PM.
 
Old 03-27-2007, 01: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, 03:17 PM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
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



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

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

All times are GMT -5. The time now is 08: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