Skip to content

Instantly share code, notes, and snippets.

@jkanclerz
Last active October 26, 2016 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jkanclerz/4c9f930bf5fc24f80228984221245f41 to your computer and use it in GitHub Desktop.
Save jkanclerz/4c9f930bf5fc24f80228984221245f41 to your computer and use it in GitHub Desktop.
usefull bash
#!/bin/bash
#Removes files older than 14 days from directory
#allows to set autoclean up some temp directory
find ~/Downloads/* -mtime +14 -exec rm -rf {} \;
#synchronize dirs with remote server
rsync -avz --progress user@server:/some/path ./some_local_dir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment