Pages

Friday, November 2, 2012

Copy files on Linux shell that have been modified or added within the last X minutes



Here is a short script that helped me to copy files that have ben modified within the last 60 minutes to a new directory. The script uses a combination of the find and cp commands, it has to be run inside the directory that contains the new files.  In this example, I will copy all files that have been modified within the last 60 minutes from /var/www to the directory /var/newfiles, you can replace the timespan or target directory in the script to match your reqzĂșirements.
First, enter the /var/www directory which contains the files:
cd /var/www
Then execute this command to find the latest files and copy them to /var/newfiles:
find ./ -type f -mmin -60  -exec cp -pf {} /var/newfiles/ \;

Tiny Core Linux 4.7


Robert Shingledecker has released version 4.7 of Tiny Core Linux, a minimalist but extensible graphical Linux distribution for desktop computers. From the release announcement: "I am pleased to announce the release of Core 4.7. Change log: updated ondemand to support scm extensions and icons from both tcz and scm; updated wbar - to support scm ondemand icons; updated scmapps GUI for new ondemand maintenance and download option; updated scm-load - new option -wo ondemand download; updated tc-functions - added new support functions; updated scm to interface to updated scmaps GUI; new scm-run to support scriptable load and launch scm style extensions; updated filetool - new GUI access to filetool.lst, .xfiletool.lst, and backup options; updated filetool.sh to interface to updated filetool GUI; updated apps GUI - New Check Onboot Unneeded and changes required by ondemand scm support...." Download links: TinyCore-4.7.iso (12.0MB, MD5), CorePlus-4.7.iso (66.0MB, MD5).

Thunar Dropbox: Enable Dropbox Context Menu on Thunar File Manager



I have written about step-by-step post on how to get Dropbox "Copy Public Link" works on Thunar File Manager. I have found easier way to do that by installing Thunar Dropbox. Thunar Dropbox is a plugin for Thunar file manager which adds Dropbox context-menu.



Unfortunately, the plugin doesn't come with Dropbox itself and there is no PPA or any repository yet. So you have to download and compile it manually to get things done. So, please follow this guide to install Thunar Dropbox on your system. I assume that you have installed and configured Dropbox properly. Grab the ZIP archive of Thunar Dropbox here. Once downloaded, extract the file and open Terminal.

Installing dependencies
  • sudo apt-get install libthunarx-2-dev

Now, it's time to compile Thunar Dropbox:
  • ./waf configure --prefix=/usr
  • ./waf build
  • sudo ./waf install
Thunar Dropbox uses Python 2 as its interpreter. So, please make sure to use Python 2 when compiling.

Once installed, login and log out back in order to change to takes effect.

This plugin has been tested on Xubuntu 12.10 Quantal Quetzal and everything looks well :)