aclean Reference

The Aspera aclean command-line tool is a fast method of deleting directories and files from local and object storage. Directories and files can be filtered based on their last modified times. For Windows operating systems, the created time (CTIME) and modified time (MTIME) are used as the matching criteria. You can do a dry run of an aclean command to test what content will be deleted. aclean can be run on any machine on which Aspera A4 is supported.

Note: The directory specified in an aclean command is not deleted. Only the content in the directory that matches the options is deleted.

Syntax

aclean [options] directory

Directory path format

Options

Option (short version, long version) Description
-h, --help Display help.
-A, --version Display version.
-L, --logdir Set the filepath for the log directory.
-n, --dry-run Run the command as a trial to show what content would be deleted.
-t, --threads Set the number of threads to use to scan the directory. (Default: 8)
--remove-empty-dirs Delete empty subdirectories from the specified directory.
--remove-newer-than=MTIME Delete files that are newer than MTIME. MTIME is a date and time string with the format YYYY-mm-dd HH:MM. The timestamp is based on the local time of the machine.
--remove-older-than=MTIME Delete files that are older than MTIME. MTIME is a date and time string with the format YYYY-mm-dd HH:MM. The timestamp is based on the local time of the machine.

Examples

Delete the contents of the local directory /temp/logs-test/:

$ aclean /temp/logs-test/

View what files would be deleted if /temp/logs-test/ is deleted:

$ aclean --dry-run /temp/logs-test/

Delete subdirectories in /temp/logs-test/ if they are empty:

$ aclean --remove-empty-dirs /temp/logs-test/

Delete files that have a last-modified time older than March 27, 2017 13:34 from Azure object storage:

$ aclean --remove-older-than=2017-03-27 13:34 azu://user:key@blob.microsoft.com