LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Delete Files through Command Window (https://www.linuxquestions.org/questions/linux-newbie-8/delete-files-through-command-window-541060/)

ankz.upadhyay 03-27-2007 12:35 PM

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.

theNbomr 03-27-2007 12:43 PM

rm -Rf
--- rod

ankz.upadhyay 03-27-2007 12:55 PM

Hi Mate

Thanks for reply.

is this what you mean by your reply /

rm -Rf filename rod

Please do send confirmation.

Thanks.

jay73 03-27-2007 01:46 PM

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.

MOS JEFF-INITELY 03-27-2007 01:55 PM

you could also use:

shred -uf <filename>

http://unixhelp.ed.ac.uk/CGI/man-cgi?shred+1

theNbomr 03-27-2007 03:17 PM

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.


All times are GMT -5. The time now is 04:09 PM.