How to: Find files edited in the last day
February 15, 2010
The process is straight forwarded. There are several methods:
find . -mtime -1 \! -type d -exec ls -l {} \;
Or more simply
find . -type f -mtime -1
In my case, I wanted to do more. First since I was searching an SVN repository, I wasted to exclude all of the extra files that are touched by SVN. Additionally, the goal was to show which files contained a print_r function.
Here’s what I came up with:
find . -path '*/.svn/*' -prune -o -type f -mtime -1 \
-exec echo '{}' \; -exec grep print_r {} \;
Hope that helps!
Getting the error ‘cannot move – to a subdirectory of itself’?
August 19, 2009
This error message always bothered me because it makes no sense when I get it.
Here’s my scenario… I have a directory that is used as the base for all new accounts I sell on my servers. The path is; /root/cpanel3-skel. I always put WordPress in that directory and I want to keep the latest version of WP in that directory
[root@wiredtree ~]# rm -r wordpress latest.*
rm: cannot remove `wordpress’: No such file or directory
rm: cannot remove `latest.*’: No such file or directory
[root@wiredtree ~]# wget -q http://wordpress.org/latest.zip
[root@wiredtree ~]# unzip -q latest.zip
[root@wiredtree ~]# mv -f wordpress/* /root/cpanel3-skel/public_html/
mv: cannot move `wordpress/wp-admin’ to a subdirectory of itself, `/root/cpanel3-skel/public_html/wp-admin’
mv: cannot move `wordpress/wp-content’ to a subdirectory of itself, `/root/cpanel3-skel/public_html/wp-content’
mv: cannot move `wordpress/wp-includes’ to a subdirectory of itself, `/root/cpanel3-skel/public_html/wp-includes’
WHAAAAT? Obviously it is not a subdirectory of itself…
Something strange is going on… We get a little more information if we try to do a move from one device to another. Take a look at this error message:
[root@wiredtree tmp]# mv -f wordpress/* /root/cpanel3-skel/public_html/
mv: inter-device move failed: `wordpress/wp-admin’ to `/root/cpanel3-skel/public_html/wp-admin’; unable to remove target: Is a directory
mv: inter-device move failed: `wordpress/wp-content’ to `/root/cpanel3-skel/public_html/wp-content’; unable to remove target: Is a directory
mv: inter-device move failed: `wordpress/wp-includes’ to `/root/cpanel3-skel/public_html/wp-includes’; unable to remove target: Is a directory
This reveals the true source of the error message. In “mv –help”, the explanation of “-f” is too simplified and says only:
-f, –force do not prompt before overwriting
In “cp –h” we closer,but not exact, explanation of the real process, and one that better matches the inter-device error message:
-f, –force if an existing destination file cannot be opened, remove it and try again
The final bit of information is in an Ubunto bug 71174 “Misleading error message with mv and existing directories” where they change the error message to be “mv: cannot move `a’ to `b/a’: Directory not empty”.
So there you have it. You get that error message because the -f command tries first to remove the directory and can’t because it contains one or more files. You don’t get this message if the subdirectories are empty. The remove works fine on an empty directory but fails if there are files. The Linux core can’t correctly handle this exception and throws up what is probably the last error message in a switch/case statement “cannot move – to a subdirectory of itself”.
So what do you do about it? Well you can either empty the destination directory first, or you can copy the files and then delete the source directory. I chose the latter option and run this from the root folder:
rm -r wordpress latest.*
wget -q http://wordpress.org/latest.zip
unzip -q latest.zip
cp -rf wordpress/* cpanel3-skel/public_html/
rm -r wordpress latest.*
Cool? Hope that helps someone…
Microsoft: I just stepped into what?
July 6, 2007
Microsoft scrambles quickly backwards away from a GPLv3 and checks its loafers to see exactly what it just put its $500 loafers into… Still “As always, Microsoft remains committed to working with the open source software community”.
Microsoft Statement About GPLv3
A Microsoft statement about GPLv3.
Published: July 5, 2007
Microsoft is not a party to the GPLv3 license and none of its actions are to be misinterpreted as accepting status as a contracting party of GPLv3 or assuming any legal obligations under such license.
While there have been some claims that Microsoft’s distribution of certificates for Novell support services, under our interoperability collaboration with Novell, constitutes acceptance of the GPLv3 license, we do not believe that such claims have a valid legal basis under contract, intellectual property, or any other law. In fact, we do not believe that Microsoft needs a license under GPL to carry out any aspect of its collaboration with Novell, including its distribution of support certificates, even if Novell chooses to distribute GPLv3 code in the future. Furthermore, Microsoft does not grant any implied or express patent rights under or as a result of GPLv3, and GPLv3 licensors have no authority to represent or bind Microsoft in any way.
At this point in time, in order to avoid any doubt or legal debate on this issue, Microsoft has decided that the Novell support certificates that we distribute to customers will not entitle the recipient to receive from Novell, or any other party, any subscription for support and updates relating to any code licensed under GPLv3. We will closely study the situation and decide whether to expand the scope of the certificates in the future.
As always, Microsoft remains committed to working with the open source software community to help improve interoperability for customers working in mixed source environments and deliver IP assurance. Our partnerships with Novell and other Linux platform and desktop providers remain strong and the IP bridge we built with them, embodied in our collaboration agreements, remains intact. In particular, our technical and business collaboration with Novell continues to move full steam ahead, including our joint development work on virtualization, standards-based systems management, identity interoperability and document format translators. In addition, the patent covenants offered by Microsoft and Novell to each other’s customers are unchanged, and will continue to apply in the same way they did previously.
Notes on Microsoft/Novell Anouncement: SUSE Linux/Windows Interoperablity
November 2, 2006
(Article Draft – Corrections will be made to spelling and grammar – These views are mine coming as fast as I can type with the live announcement. I apologies for any typos/misquotes/misinterpretations.)
Microsoft and Novell made an abrupt disclosure via their web cast site that there would be a VERY IMPORTANT announcement. That announcement occurred at 2:19pm PST/5:19pmEST. This announcement is important to large scale Enterprise and Server/datacenter operators as well as the developer community. It offers more choices, opportunties and technologies to IT operators around the world.
You may view the WebCast session in its entirety using any with these links:
Please, as you listen to the session, if I can enhance or correct any of my notes, please let me know in a comment on this post.
Read more
BIG LIVE Microsoft/Novell/Linux? announcement RIGHT NOW
November 2, 2006
Bridging the devide between Closed/OpenSource and Linux/Windows
It will last till 2:49pm GO THERE NOW!!!!!!
It started 2:19pm EST
Steve Ballmer to Deliver Industry Announcement
November 2, 2006
Microsoft Corp. CEO Steve Ballmer will deliver an announcement during a press conference today, Thurs., Nov. 2, in San Francisco beginning at 2 p.m. Pacific time / 5 p.m. Eastern time. Details of the announcement will be provided during the press conference.

