Linux batch delete file and empty file delete command

  
                  

Delete the file or directory command under linux rm(remove)

Description: Delete files or directories.

Syntax: rm [-dfirv][--help][--version][file or directory...] Supplement: Execute the rm command to delete files or directories. To delete a directory, you must add The parameter "-r", otherwise the default will only delete the file. Parameters: -d or --directory Delete the hard-wired data of the directory to be deleted directly into 0 and delete the directory. -f or --force Forces the deletion of files or directories. -i or --interactive Ask the user before deleting an existing file or directory. -r or -R or --recursive Recursive processing, all files and subdirectories under the specified directory are processed together. -v or --verbose Displays the instruction execution process. --help Online help.

The method of batch deleting empty files (files with size equal to 0) under Linux

The code is as follows

find . -name "*" -type f -size 0c

Copyright © Windows knowledge All Rights Reserved