Skip to content

Instantly share code, notes, and snippets.

@jkanclerz
Last active October 26, 2016 14:52
Show Gist options
  • Select an option

  • Save jkanclerz/4c9f930bf5fc24f80228984221245f41 to your computer and use it in GitHub Desktop.

Select an option

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