Results 1 to 9 of 9

Thread: Does rm * remove all files

  1. #1
    Junior Member
    Join Date
    Nov 2006
    Answers
    2

    Does rm * remove all files

    Does this remove all the files


  2. #2
    Junior Member
    Join Date
    Mar 2006
    Answers
    12

    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


  3. #3
    Junior Member
    Join Date
    Sep 2007
    Answers
    10

    Re: rm *

    if we give rm -rf then it deletes the hole contants including subdirectories.
    be aware while using rm.


  4. #4
    Junior Member
    Join Date
    Sep 2007
    Answers
    1

    Thumbs up Re: Does rm * remove all files

    rm -rf * will work


  5. #5
    Junior Member
    Join Date
    May 2008
    Answers
    2

    Re: Does rm * remove all files

    what will happen if rm -rf is run from root directory.


  6. #6
    Junior Member
    Join Date
    Sep 2007
    Answers
    10

    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.


  7. #7
    Junior Member
    Join Date
    May 2008
    Answers
    1

    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.


  8. #8
    Junior Member
    Join Date
    Jul 2008
    Answers
    1

    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


  9. #9
    Junior Member
    Join Date
    Aug 2008
    Answers
    1

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact