Here’s how to list S3 files recursively.
aws s3 ls s3://mybucket --recursive | awk '{print $4}' |
By default, the results display date, time, disk size and filename. Use awk to display the filename only.
cloud engineer
Here’s how to list S3 files recursively.
aws s3 ls s3://mybucket --recursive | awk '{print $4}' |
aws s3 ls s3://mybucket --recursive | awk '{print $4}'
By default, the results display date, time, disk size and filename. Use awk to display the filename only.
If you work with MacOS and you FTP files to a Linux server, you probably have seen this pesky and ubiquitous hidden files named .DS_Store. They seem to be in every folder known to man. The .DS_Store files are hidden MacOS files used to store the attributes of a folder such as position of icons and choice of background images, etc. Although they are not harmful, they probably don’t belong on the web server. Instead of deleting them one by one, there’s a faster way of deleting them recursively. You can invoke this command from the Linux terminal on your webroot folder.
cd /var/www/ find . "-name" ".DS_Store" -exec rm {} \; |
cd /var/www/ find . "-name" ".DS_Store" -exec rm {} \;
The .DS_Store files will be deleted recursively.