Geeks Talk

Prepare for your Next Interview




Does rm * remove all files

This is a discussion on Does rm * remove all files within the Unix/Linux forums, part of the Operating Systems category; Does this remove all the files...


Go Back   Geeks Talk > Operating Systems > Unix/Linux

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-13-2007
Junior Member
 
Join Date: Nov 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
smita76 is on a distinguished road
Does rm * remove all files

Does this remove all the files
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-19-2007
Junior Member
 
Join Date: Mar 2006
Location: Noida
Posts: 11
Thanks: 0
Thanked 3 Times in 3 Posts
tagro82 is on a distinguished road
Re: rm *

Depends on the permissions of files.
rm * will remove all the files in a given directory if delete permissions are there for the files.
Its a very dangerous command
Reply With Quote
  #3 (permalink)  
Old 09-25-2007
Junior Member
 
Join Date: Sep 2007
Location: chennai
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
lakshmananindia is on a distinguished road
Re: rm *

if we give rm -rf then it deletes the hole contants including subdirectories.
be aware while using rm.
Reply With Quote
  #4 (permalink)  
Old 09-25-2007
Junior Member
 
Join Date: Sep 2007
Location: bangalore
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
lakshmi20074u is on a distinguished road
Thumbs up Re: Does rm * remove all files

rm -rf * will work
Reply With Quote
  #5 (permalink)  
Old 05-23-2008
Junior Member
 
Join Date: May 2008
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
bathija is on a distinguished road
Re: Does rm * remove all files

what will happen if rm -rf is run from root directory.
Reply With Quote
  #6 (permalink)  
Old 05-24-2008
Junior Member
 
Join Date: Sep 2007
Location: chennai
Posts: 10
Thanks: 0
Thanked 1 Time in 1 Post
lakshmananindia is on a distinguished road
Re: Does rm * remove all files

Quote:
Originally Posted by bathija View Post
what will happen if rm -rf is run from root directory.
It will delete everything. Don't try this.
Reply With Quote
  #7 (permalink)  
Old 05-24-2008
Junior Member
 
Join Date: May 2008
Location: barrackpore
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
PAULSK is on a distinguished road
Re: Does rm * remove all files

rm * will delete all the files in sufficient permissions are there.bt anway it will not delete the directories directly.
Reply With Quote
  #8 (permalink)  
Old 07-22-2008
Junior Member
 
Join Date: Jul 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Sunil.M is on a distinguished road
Re: Does rm * remove all files

rm * ---- > Delete's all the files in the current directory.
rm -r * ---> Delete's both the files and the directories in the current directory.

Pls note the above commands don't delete the Hidden Files.

Hidden files are the files which start with .filename , inorder to view the file we need to use the ls -a option.

To delete these files also use a . , i.e:
rm *.*

Note:- All above commands will work only if u have sufficient privileges to do so
Reply With Quote
  #9 (permalink)  
Old 08-24-2008
Junior Member
 
Join Date: Aug 2008
Location: USA
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
tcsonly is on a distinguished road
Re: Does rm * remove all files

Quote:
Originally Posted by smita76 View Post
Does this remove all the files
Try to read the man page first, & understand, instead of waiting for 5 days to get the 1st response.
Reply With Quote
Reply

  Geeks Talk > Operating Systems > Unix/Linux


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Remove an application without "uninstall/Remove" option anushya Windows 6 2 Weeks Ago 01:52 PM
East-Tec Backup 2007 backs up and protects the files and data you care about (files, JobHelper Geeks Lounge 0 09-03-2007 12:20 PM
Code to remove the pop up blockage Geek_Guest QTP 2 04-20-2007 02:48 AM
I want to remove - sign value ROHIT_4444 Oracle 15 04-06-2007 12:25 AM
remove duplicate values in a source using Informatica JobHelper Data Warehousing 4 02-03-2007 03:13 AM


All times are GMT -4. The time now is 08:26 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved