Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/r/rm.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/r/rm.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/r/rm.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/r/rm.html on line 8
Remove files (POSIX)
rm [-Rfir] [-d] [-l n] [-v] file...
QNX Neutrino, Microsoft Windows
- -d
- (QNX Neutrino extension) If the -R option is specified, remove the files but
leave the directory tree intact (i.e. no rmdir is
performed).
- -f
- Force each specified file to be removed without prompting for confirmation.
- -i
- Be interactive; request confirmation before removing each existing file.
- -l n
- (“el”) (QNX Neutrino extension) If the -R
option is specified, recurse only n levels down a
directory tree.
- -r
- Equivalent to the -R option (below).
- -R
- Recursively remove files and subdirectories under directories given as
arguments. This process removes the directory and the entire file tree
under it.
|
Use the -R option with care, as it removes
directories, subdirectories, and files. Using the -i
option with -R adds a measure of safety by turning on
interactive prompting before each file or directory is removed. |
- -v
- (QNX Neutrino extension) Be verbose; print files and directories as they're removed.
- file
- The pathname of a file to be removed.
The rm utility removes each specified file from a directory.
By default, rm refuses to remove any file that names
a directory. This may be overridden with the -R or
-r options. In any case, rm always refuses to
remove the current working directory.
If a file operand has been specified but doesn't
exist and the -f option hasn't been given, a message is
written to the standard error output. If -f has been given,
the error message isn't written. In either case, rm goes
on to any remaining files specified on the command line.
The rm utility doesn't necessarily remove the file itself.
A file may have more than one link; that is, it may be known by more
than one name in the filesystem (see the ln utility for
information on creating links). The rm utility breaks
one such link; it dissociates the file from one name. If this is the
only link, the file data becomes inaccessible and the file space is
returned to the system for reuse. Otherwise, the data remains accessible
via other names.
Remove the a.out and core files:
rm a.out core
Remove the directory junk and all its contents, without
prompting:
rm -Rf junk
- 0
- All the named files were removed.
- >0
- An error occurred.
rmdir,
find
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/r/rm.html on line 162
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/r/rm.html on line 162