• Skip to main content

Uly.me

cloud engineer

  • Home
  • About
  • Archives

recursively

AWS S3 LS Recursive

April 5, 2020

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.

Filed Under: Cloud Tagged With: awk, aws, ls, recursively, s3

Delete .DS_Store Files Recursively

January 31, 2013

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.

Filed Under: Mac Tagged With: .ds_store, delete, mac os, recursively

  • Home
  • About
  • Archives

Copyright © 2023