locate: This runs fast, because it consults a database - updatedb updates the database find: This doesn't use a database Tests, example: -type (b|c|d|f|l) Another example: -name man has a list Logic operators! -and, -or, -not, ( ) - Remember, the shell will still expand stuff Actions: -delete, -ls, -print (default), -quit Actions can be in logical operators! - lazy evaluation and actions xargs vs. backticks - xargs will do multiple batches - xargs can do multiple processors - -n option, for separate invocation - Let's load isoptera and watch it heat up! xargs example: Download all CS228 assignments in parallel - Side note: Web spider wget can already do this Archives! tar is a common unix archive - "tarballs" - tar command manipulates these (-cf to make, -xf to extract) - Meaning of -f, standard input Unix philosophy: A toolbox Compression! - gzip - bzip2 - xz (LZMA, like 7zip without 7zip You can compress files that aren't archives - Example: zcat and mysql error messages tar can run the compression program for you! - tar -czf, -xzf, some people use -czvf and -xzvf Backups often use tar - Example: annelid (is only kind of backed up) - Distributed systems, and distributed backup - Two is one, and one is none + When the zombies arrive... cron again - System administration: /etc, cron has stuff in here - crontab command as a regular user .zip archives: - These were popularized with WinZip, but they're not bad - zip tool, unzip tool - I use these more than .tar.gz + Go with the flow Securing the backup: Some archive tools can do this for you (example: zip with -e) Quality varies You can usually decrypt individual files Maybe even update it Encrypt the entire archive: Use whatever encryption process you prefer You will have to decrypt the entire archive to see individual files Store it in an encrypted filesystem: Most user-friendly Anybody who can mount the filesystem will have access to the backup Encrypt the archive, burn it to a CD, bury it in the woods Or the cloud Notes about backups: Most people neglect them Hardware really does fail sometimes The filesystem can also fail, but usually won't Setting up cron to make regular backups can be very helpful!