Home Page The Club Computers News Links Glossary EYAWTK
Before Amiga Background ICS OCS ECS AGA ??? PPC
U-Boot SLB Linux Amiga OS Dual Boot Motherboards Peripherals Other
Initialisation Installation OS4 Updates About OS4 File Systems Networking Printing Other
Introduction File System Workbench Preferences Commands Error Msgs Miscellaneous

AmigaOS 4.0 - About OS4 - Commands

Purpose: To delete files or directories.
Format: DELETE {<name> | <pattern>} [ALL] [QUIET] [INTER | INTERACTIVE] [FORCE] [WIPE]
DELETE attempts to delete (erase) the specified file(s). If more than one file was specified, AmigaDOS continues to the next file in the list.

You can use pattern matching to delete files. The pattern may specify directory levels as well as filenames. All files that match the pattern are deleted. To abort a multiple-file DELETE, press Ctrl-C.

AmigaDOS does not request confirmation of deletions. An error in a pattern-matching DELETE can have severe consequences, as deleted files are unrecoverable. Be sure you understand pattern matching before you use this feature, and keep backups of important files.

Warning: If you try to delete a directory that contains files, you will receive a message stating that the directory could not be deleted as it is not empty. To override this, use the ALL option. DELETE ALL deletes the named directory, its subdirectories, and all files.

Filenames are displayed on the screen as they are deleted. To suppress the screen output, use the QUIET option or the local shell variable _Verbosity with a negative value.

If the d (deletable) protection bit of a file has been cleared, that file cannot be deleted unless the FORCE option is used.

If the INTERACTIVE option is used, you will be prompted to confirm each single deletion (enter 'y' to confirm). Note that the FORCE option will override the INTERACTIVE option, turning it off.

When the WIPE option is used, the file's contents are overwritten using up to 7 passes on each track of the disk using the United States Department of Defense 5220-22.M standard procedure. This is designed to make the data very, very hard to recover, and means that while any subsequent attempt to undelete or recover the file may be successful, the contents of the file will not be readable, especially useful when deleting sensitive data. The procedure does have its limitations. It takes a while to complete, and it only works for data stored on magnetic media. You should not use it with solid state memory or optical media.

Example 1:

3.OS4:> DELETE Old-file deletes the Old-file file in the current directory.

Example 2:

3.OS4:> DELETE Work/Prog1 Work/Prog2 Work deletes the files Prog1 and Prog2 in the Work directory, and then deletes the Work directory (if there are no other files left in it).

Example 3:

3.OS4:> DELETE T#?/#?(1|2) deletes all files that end in 1 or 2 in directories that start with T.

Example 4:

3.OS4:> DELETE FD1:#? ALL FORCE deletes all the files on FD1:, even these set as not deletable.


Return to Commands Selection

Disclaimer: Amiga Auckland have prepared the above information for the use of its members based on our experiences and as such is subject to revision at any time. Amiga Auckland cannot guarantee any of the information and cannot be held accountable for any issues that may result from using it.

Copyright 2006 Amiga Auckland Inc. All rights reserved.
Revised: December 24, 2006.