BASH
Checking user access to files in Linux
How can I know if a user has access to a file or a folder in Linux? Also, what groups is a user a member of? A few things I can never remember how to do.
Cygwin BASH function to open the latest version of a document
One handy function I’ve added to .bashrc (so it is always available) under Cygwin (the LINUX command environment for Windows) works out the current working version of a document. It assumes that you keep copies that have a version number or date in the file name that will sort correctly. You can use it with an alias like this: If you name your documents sensibly such as “a-document-2009-07-20.doc” or “a-document-v01.01.doc”, then the latest version of the file will be opened in the default application
Shell script to Back up critical files (using RSYNC)
Following up from my article on backing up USB drives, this recipe backs up the critical files on my desktop to remote storage (a NAS device on my network). Note that PC2 is the desktop to be backed up, SLUG1 (192.168.1.2) is the NAS device and USER1 is the user id doing the backup. I have a similar script that runs on the NAS device which backs key files on that to a remote hosting service on a different continent!
Automatically Backing up a USB Drive with RSYNC (KDE)
USB Drives of all kinds need to be backed up and the best backup is an automatic one (it’s the only way to make sure that it gets done!). So here is one recipe for doing just that using RSYNC and some BASH scripting magic. I’ve split this into two files. You don’t have to do this of course and one may well be better for you. I used two because I can run the second one manually as well.