Koozali.org: home of the SME Server

delete

Ian

delete
« on: July 21, 2002, 05:34:40 AM »
I want to delete everything in a folder including subfolders what is the command to do this

chris meredith

Re: delete
« Reply #1 on: July 21, 2002, 05:39:09 AM »
rm --help
Usage: rm [OPTION]... FILE...
Remove (unlink) the FILE(s).

  -d, --directory       unlink directory, even if non-empty (super-user only)
  -f, --force           ignore nonexistent files, never prompt
  -i, --interactive     prompt before any removal
  -r, -R, --recursive   remove the contents of directories recursively
  -v, --verbose         explain what is being done
      --help            display this help and exit
      --version         output version information and exit

To remove a file whose name starts with a -', for example -foo',
use one of these commands:
  rm -- -foo

  rm ./-foo
-----------------------------------------------
try rm -rf

The internet is a big place with lots of info.  You might try looking places other than just this forum.

Ian

Re: delete
« Reply #2 on: July 21, 2002, 05:45:03 AM »
i am trying to remove a directory and all of its contents:  Below is the message i get

rm: remove directory techsoup'? y
rm: cannot unlink techsoup': Is a directory

how do I unlink it

Jon Blakely

Re: delete
« Reply #3 on: July 21, 2002, 05:55:50 AM »
use

# rm -fr techsoup

Jon