Find the answer to your Linux question:
Results 1 to 3 of 3
I cant figure out or find out in google how to do delete files or folders from the directory. Anyone know?...
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    7

    deleting files or directories in terminal

    I cant figure out or find out in google how to do delete files or folders from the directory. Anyone know?

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    cd to directory and execute
    Code:
    rm <filename>
    for deleting directory, use -r option.
    Code:
    rm -r <directory>
    check manual of rm command. man rm.
    you can't delete file or directory outside your home folder. you have to gain root privileges for that.
    check LinuxCommand.org: Learn the Linux command line. Write shell scripts.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Jun 2007
    Posts
    7
    Thanks, ill check out that website.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •