The command you provided is a combination of several Unix/Linux commands that are used to find and list files in a directory.
find /directory -type f -size +sizek -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
find
Command:
find
command is used to search for files and directories in a specified directory.-type f
: This option tells find
to search for regular files (not directories or other types of files).-size +sizek
: This part is used to specify a size filter. Replace size
with a numeric value and k
with a unit (e.g., k
for kilobytes, M
for megabytes). It finds files that are larger than the specified size.exec
Option:
-exec
option is used to execute a command on each found file.ls -lh {} ;
: Here, the ls -lh
command is executed on each file to list their details in a human-readable format, including file size, permissions, owner, group, modification date, and filename.awk
Command:
awk
command is used to format the output.'{ print $9 ": " $5 }'
: This part extracts the 9th and 5th columns from the ls -lh
output, which are the filename and file size, respectively. It then prints these two pieces of information in the format "filename: size."