Skip to content

Instantly share code, notes, and snippets.

@Scarbous
Created December 5, 2019 08:28
Show Gist options
  • Save Scarbous/4405806d0bace7efc5c2b10a4eba71bc to your computer and use it in GitHub Desktop.
Save Scarbous/4405806d0bace7efc5c2b10a4eba71bc to your computer and use it in GitHub Desktop.
Bash Commands
# get files bigger then 1G in current dir
find . -maxdepth 5 -type f -size +1G -print0 | xargs -0 ls -Shal
# get size of folders in current dir, sortet by size
du -h -d1 | sort -h
# delete files older then 7 days in current dir
find . -type f -mtime +7 -print | xargs rm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment