cmd

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 18, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteFilesCommand = &cli.Command{
	Name:  "delete-loop",
	Usage: "Endless loop that recursively deletes files and directories according the given parameters",
	Description: "This command recursively walks the given start directory and deletes files older than the given `age`. " +
		"Directories will only be deleted last and only if there are no files left to be contained. The loop will run " +
		"eternally until it receives the following signals: SIGHUP, SIGINT (Strg+C), SIGTERM, SIGKILL.",
	Action:    deleteFiles,
	ArgsUsage: "directory",
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:    flagMaxAgeHoursLong,
			Usage:   "Sets the max. age of files and directories in hours that will be deleted. Must be larger than zero.",
			Value:   12,
			Aliases: []string{flagMaxAgeHoursShort},
		},
		&cli.IntFlag{
			Name:    flagLoopIntervalMinutesLong,
			Usage:   "Sets the interval in minutes to run the deletion routine. Must be larger than zero.",
			Value:   60,
			Aliases: []string{flagLoopIntervalMinutesShort},
		},
	},
}

DeleteFilesCommand provides CLI entry logic for deleting files..

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL