Running ArchLinux, I like to mess with system configs alot, and i was wanting an easy way to make intelligent backup copies of my files ... QUICKLY.
To the rescue, the .bashrc file !!!
Insert this function into your .bashrc file to make quick work of backing up files.
Code:
bu () { cp $1 ${1}-`date +%Y%m%d%H%M`.backup ; }
it works pretty simply, say you want to make a backup copy of your /etc/fstab file ...... (now who DOESN'T need a backup copy of that I ask you ?

) You can supply the full path /etc/fstab ......as shown below, or you can cd into the directory the file resides in and just call the file....as shown even FURTHER below

The command is simply
bu followed by either the full path and filename, or if your already in the files directory, just
bu FILENAMECode:
[root@VistaKillerTwo ~]# bu /etc/fstab
[root@VistaKillerTwo ~]# cd /etc/
---
-rw-r--r-- 1 root root 595 Jan 15 02:54 fstab
-rw-r--r-- 1 root root 595 Jan 15 23:46 fstab-200701152346.backup
---
[root@VistaKillerTwo etc]# bu fstab
[root@VistaKillerTwo etc]# ls -la
---
-rw-r--r-- 1 root root 595 Jan 15 02:54 fstab
-rw-r--r-- 1 root root 595 Jan 15 23:46 fstab-200701152346.backup
-rw-r--r-- 1 root root 595 Jan 15 23:48 fstab-200701152348.backup
---
The backup copy is listed by Year/Month/Day/Hour/Minute ...... and if your REALLY crazy, you could add in seconds.......

Makes it easy to keep track of when you made a backup and makes it easy to do too.

Want to remove all the
.backup files ???
Code:
rm -f *.backup
..... make sure nothing else is labeling their backups with the same .backup extension or you might erase something you didn't intend too !

Hope it comes in handy for someone else besides myself
