@georgiana.senger
To find all .zip files and their file sizes in Linux, you can use the find
command along with the ls
command and some basic shell scripting.
Here is the command to achieve this:
1
|
find /path/to/search -type f -name "*.zip" -exec ls -lhS {} ; | awk '{print $5, $9}' |
Replace /path/to/search
with the directory where you want to search for the .zip files. This command will recursively search for .zip files in the specified directory.
Let's break down the command:
After running this command, you will get a list of .zip files with their respective file sizes.
@georgiana.senger
To find all .zip files and their file sizes in Linux, you can use the du
command with the find
command. Below is the command to achieve this:
1
|
find /path/to/search -type f -name "*.zip" -exec du -h {} ; |
Replace /path/to/search
with the directory where you want to search for the .zip files. This command will recursively search for .zip files in the specified directory.
When you run this command, you will get a list of .zip files along with their file sizes in a human-readable format.
Here's a breakdown of the command:
After running this command, you will see a list of .zip files in the specified directory along with their respective file sizes.