Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
Apple Computing Products:
macOS - Operating System
Deleting Hidden files...
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="witeshark" data-source="post: 57408" data-attributes="member: 3865"><p><span style="color: darkred">rm, unlink - remove directory entries</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">SYNOPSIS</span></p><p><span style="color: darkred"> rm [-dfiPRrvW] file ...</span></p><p><span style="color: darkred"> unlink file</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">DESCRIPTION</span></p><p><span style="color: darkred"> The rm utility attempts to remove the non-directory type files specified</span></p><p><span style="color: darkred"> on the command line. If the permissions of the file do not permit writ-</span></p><p><span style="color: darkred"> ing, and the standard input device is a terminal, the user is prompted</span></p><p><span style="color: darkred"> (on the standard error output) for confirmation.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> The options are as follows:</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -d Attempt to remove directories as well as other types of</span></p><p><span style="color: darkred"> files.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -f Attempt to remove the files without prompting for confirma-</span></p><p><span style="color: darkred"> tion, regardless of the file's permissions. If the file does</span></p><p><span style="color: darkred"> not exist, do not display a diagnostic message or modify the</span></p><p><span style="color: darkred">:</span></p><p><span style="color: darkred">rm, unlink - remove directory entries</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">SYNOPSIS</span></p><p><span style="color: darkred"> rm [-dfiPRrvW] file ...</span></p><p><span style="color: darkred"> unlink file</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">DESCRIPTION</span></p><p><span style="color: darkred"> The rm utility attempts to remove the non-directory type files specified</span></p><p><span style="color: darkred"> on the command line. If the permissions of the file do not permit writ-</span></p><p><span style="color: darkred"> ing, and the standard input device is a terminal, the user is prompted</span></p><p><span style="color: darkred"> (on the standard error output) for confirmation.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> The options are as follows:</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -d Attempt to remove directories as well as other types of</span></p><p><span style="color: darkred"> files.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -f Attempt to remove the files without prompting for confirma-</span></p><p><span style="color: darkred"> tion, regardless of the file's permissions. If the file does</span></p><p><span style="color: darkred"> not exist, do not display a diagnostic message or modify the</span></p><p><span style="color: darkred">:</span></p><p><span style="color: darkred">exit status to reflect an error. The -f option overrides any</span></p><p><span style="color: darkred"> previous -i options.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -i Request confirmation before attempting to remove each file,</span></p><p><span style="color: darkred"> regardless of the file's permissions, or whether or not the</span></p><p><span style="color: darkred"> standard input device is a terminal. The -i option overrides</span></p><p><span style="color: darkred"> any previous -f options.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -P Overwrite regular files before deleting them. Files are</span></p><p><span style="color: darkred"> overwritten three times, first with the byte pattern 0xff,</span></p><p><span style="color: darkred"> then 0x00, and then 0xff again, before they are deleted.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -R Attempt to remove the file hierarchy rooted in each file</span></p><p><span style="color: darkred"> argument. The -R option implies the -d option. If the -i</span></p><p><span style="color: darkred"> option is specified, the user is prompted for confirmation</span></p><p><span style="color: darkred"> before each directory's contents are processed (as well as</span></p><p><span style="color: darkred">:</span></p><p><span style="color: darkred">before each directory's contents are processed (as well as</span></p><p><span style="color: darkred"> before the attempt is made to remove the directory). If the</span></p><p><span style="color: darkred"> user does not respond affirmatively, the file hierarchy</span></p><p><span style="color: darkred"> rooted in that directory is skipped.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -r Equivalent to -R.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -v Be verbose when deleting files, showing them as they are</span></p><p><span style="color: darkred"> removed.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> -W Attempt to undelete the named files. Currently, this option</span></p><p><span style="color: darkred"> can only be used to recover files covered by whiteouts.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> The rm utility removes symbolic links, not the files referenced by the</span></p><p><span style="color: darkred"> links.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> It is an error to attempt to remove the files ``.'' or ``..''.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred"> When the utility is called as unlink, only one argument, which must not</span></p><p><span style="color: darkred"> be a directory, may be supplied. No options may be supplied in this sim-</span></p><p><span style="color: darkred"> ple mode of operation, which performs an unlink(2) operation on the</span></p><p><span style="color: darkred"> passed argument.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">:</span></p><p> <span style="color: darkred">The rm utility exits 0 if all of the named files or file hierarchies were</span></p><p><span style="color: darkred"> removed, or if the -f option was specified and all of the existing files</span></p><p><span style="color: darkred"> or file hierarchies were removed. If an error occurs, rm exits with a</span></p><p><span style="color: darkred"> value >0.</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">NOTE</span></p><p><span style="color: darkred"> The rm command uses getopt(3) to parse its arguments, which allows it to</span></p><p><span style="color: darkred"> accept the `--' option which will cause it to stop processing flag</span></p><p><span style="color: darkred"> options at that point. This will allow the removal of file names that</span></p><p><span style="color: darkred"> begin with a dash (`-'). For example:</span></p><p><span style="color: darkred"> rm -- -filename</span></p><p><span style="color: darkred"> The same behavior can be obtained by using an absolute or relative path</span></p><p><span style="color: darkred"> reference. For example:</span></p><p><span style="color: darkred"> rm /home/user/-filename</span></p><p><span style="color: darkred"> rm ./-filename</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">SEE ALSO</span></p><p><span style="color: darkred"> rmdir(1), undelete(2), unlink(2), fts(3), getopt(3), symlink(7)</span></p><p><span style="color: darkred"></span></p><p><span style="color: darkred">BUGS</span></p><p><span style="color: darkred"> The -P option assumes that the underlying file system is a fixed-block</span></p><p><span style="color: darkred"> file system. In addition, only regular files are overwritten, other types of files are not.</span></p></blockquote><p></p>
[QUOTE="witeshark, post: 57408, member: 3865"] [color=darkred]rm, unlink - remove directory entries SYNOPSIS rm [-dfiPRrvW] file ... unlink file DESCRIPTION The rm utility attempts to remove the non-directory type files specified on the command line. If the permissions of the file do not permit writ- ing, and the standard input device is a terminal, the user is prompted (on the standard error output) for confirmation. The options are as follows: -d Attempt to remove directories as well as other types of files. -f Attempt to remove the files without prompting for confirma- tion, regardless of the file's permissions. If the file does not exist, do not display a diagnostic message or modify the : rm, unlink - remove directory entries SYNOPSIS rm [-dfiPRrvW] file ... unlink file DESCRIPTION The rm utility attempts to remove the non-directory type files specified on the command line. If the permissions of the file do not permit writ- ing, and the standard input device is a terminal, the user is prompted (on the standard error output) for confirmation. The options are as follows: -d Attempt to remove directories as well as other types of files. -f Attempt to remove the files without prompting for confirma- tion, regardless of the file's permissions. If the file does not exist, do not display a diagnostic message or modify the : exit status to reflect an error. The -f option overrides any previous -i options. -i Request confirmation before attempting to remove each file, regardless of the file's permissions, or whether or not the standard input device is a terminal. The -i option overrides any previous -f options. -P Overwrite regular files before deleting them. Files are overwritten three times, first with the byte pattern 0xff, then 0x00, and then 0xff again, before they are deleted. -R Attempt to remove the file hierarchy rooted in each file argument. The -R option implies the -d option. If the -i option is specified, the user is prompted for confirmation before each directory's contents are processed (as well as : before each directory's contents are processed (as well as before the attempt is made to remove the directory). If the user does not respond affirmatively, the file hierarchy rooted in that directory is skipped. -r Equivalent to -R. -v Be verbose when deleting files, showing them as they are removed. -W Attempt to undelete the named files. Currently, this option can only be used to recover files covered by whiteouts. The rm utility removes symbolic links, not the files referenced by the links. It is an error to attempt to remove the files ``.'' or ``..''. When the utility is called as unlink, only one argument, which must not be a directory, may be supplied. No options may be supplied in this sim- ple mode of operation, which performs an unlink(2) operation on the passed argument. : The rm utility exits 0 if all of the named files or file hierarchies were removed, or if the -f option was specified and all of the existing files or file hierarchies were removed. If an error occurs, rm exits with a value >0. NOTE The rm command uses getopt(3) to parse its arguments, which allows it to accept the `--' option which will cause it to stop processing flag options at that point. This will allow the removal of file names that begin with a dash (`-'). For example: rm -- -filename The same behavior can be obtained by using an absolute or relative path reference. For example: rm /home/user/-filename rm ./-filename SEE ALSO rmdir(1), undelete(2), unlink(2), fts(3), getopt(3), symlink(7) BUGS The -P option assumes that the underlying file system is a fixed-block file system. In addition, only regular files are overwritten, other types of files are not.[/color] [/QUOTE]
Verification
Post reply
Forums
Apple Computing Products:
macOS - Operating System
Deleting Hidden files...
Top