I use simple set of shell commands to in order to create mysqldumps daily. The script is called by cron daemon. It looks like: presentdate="`date +%d-%m-%Y_%H:%M.%S`" basedir="/var/db_my_backup" ...
I wish to prepend a timestamp to each line of output from a command. For example: foo bar baz would become [2011-12-13 12:20:38] foo [2011-12-13 12:21:32] bar [2011-12-13 12:22:20] baz ...where ...
I'm trying to open a file with vim from the command line, the file is in a directory filled with automatically generated files that are prepended with a time stamp. Since I don't know the time stamps ...
How do I write a script for moving just the 20 oldest files from one folder to another? Is there a way to grab the oldest files in a folder?
I need to delete all files in a directory that were created in 2009. What command can I use to do that?