LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   rmdir -rf does not seem to work in fc4 .what do i do?rm -p also doesnt seem to work (https://www.linuxquestions.org/questions/linux-newbie-8/rmdir-rf-does-not-seem-to-work-in-fc4-what-do-i-do-rm-p-also-doesnt-seem-to-work-442997/)

vinay87 05-09-2006 12:26 AM

rmdir -rf does not seem to work in fc4 .what do i do?rm -p also doesnt seem to work
 
rmdir -rf does not seem to work in fc4 .what do i do?rm -p also doesnt seem to work

Haystack 05-09-2006 01:10 AM

Quote:

Originally Posted by vinay87
rmdir -rf does not seem to work in fc4 .what do i do?rm -p also doesnt seem to work

what about:

Code:

rm -rf bla
the option -r already indicates removing recursive, so "rmdir -r" is not valid.
rm and rmdir are not the same!

Code:

Usage: rmdir [OPTION]... DIRECTORY...
Remove the DIRECTORY(ies), if they are empty.

      --ignore-fail-on-non-empty
                  ignore each failure that is solely because a directory
                  is non-empty
  -p, --parents  Remove DIRECTORY and its ancestors.  E.g., `rmdir -p a/b/c' is
                  similar to `rmdir a/b/c a/b a'.
  -v, --verbose  output a diagnostic for every directory processed
      --help    display this help and exit
      --version  output version information and exit

Code:

Usage: rm [OPTION]... FILE...
Remove (unlink) the FILE(s).

  -d, --directory      unlink FILE, even if it is a non-empty directory
                          (super-user only; this works only if your system
                          supports `unlink' for nonempty directories)
  -f, --force          ignore nonexistent files, never prompt
  -i, --interactive    prompt before any removal
      --no-preserve-root do not treat `/' specially (the default)
      --preserve-root  fail to operate recursively on `/'
  -r, -R, --recursive  remove directories and their contents recursively
  -v, --verbose        explain what is being done
      --help    display this help and exit
      --version  output version information and exit

By default, rm does not remove directories.  Use the --recursive (-r or -R)
option to remove each listed directory, too, along with all of its contents.

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

  rm ./-foo

Note that if you use rm to remove a file, it is usually possible to recover
the contents of that file.  If you want more assurance that the contents are
truly unrecoverable, consider using shred.

If you don't know how to use a command, typing

Code:

man rmdir
will save you from much trouble.

Goodluck

Freestone 05-09-2006 09:18 AM

If you're trying to remove a non-empty directory, try this: rm -r /dirname --force.


All times are GMT -5. The time now is 05:26 AM.