Moving files (Unix/Linux)- Some tips
Moving files from one machine to another machine is the most common activity for system engineer profile. Most common examples are moving backup files, log files and some time moving a large setup files which are created per transaction. Generally these types of files are placed on bug servers and moving them is easy because you can make an archive file(tar file) of all the files and move the tar file to destination. It creates problem when you have less space left ion source machine and you need to move large number of file to another machine.
Another case may be when you need to move similar files to some other location. Example is moving same day files or same extention files to some other location. I am here trying to list some of the unix commonds which can be useful for doing file moving activity.
1. Moving files older than certain time (older than yesterday in following example).
#find -mtime +1 -exec mv "{}" /destincation_folder
2. Moving file date wise (All yesterday files)
#find -mtime 1 -daystart -exec mv "{}" /destincation_folder
Another way to do is finding all files of specific date and then iterating over them to copy into any other folder
ls -la | awk '{ print $8}' > filenames
Shell script to iterate all files
#!/bin/sh list=` cat filenames` for i in $list; do echo $i mv $i /someDIR done exit
3. Moving files in chunk (e.g moving 10000 files in one go)
#ls -la | tail 10000 | xargs mv /destination_folder
Plan your trip using Delhi Metro – Google Maps/Transit
Google started covering India as well for Google Transit results and covers following cities(For them who do not know what is a Google transit service, It is a service based on Google maps which lets you plan your trip using public transport and walking. Walking will be given in result where public transport is not available. Try it yourself ):
a. Delhi (Delhi Metro Rail)
b. Kolkata (Kolkata Metro)
c. Chennai (Chennai MRTS)
d. Hyderabad (Hyderabad Multi Modal Transit System)
As I am more close to Delhi Metro and used it several times, I tried searching a route from Noida to Delhi and following is the result (see screen shots below). The wow things which were provided were price of the journey, Total time of trip, frequency of Metro rail on origin station etc.
Here is the screen shot of results:
Thanks to Google. Make use of it . Cheers.
HTML5 JavaScript APIs
error code [1030]; Got error 28 from storage engine
This is quick thing which i wanted to share with you all and also the possible cause of this. This error started coming today afternoon on one of our production servers. We wasted some of the time searching logs and some errors which were irrelevant and finally Google for it. Quickly we got the cause which was disk. Disk was full and mysql was unable to take any extra data.
We were some of the things which made above situation for us:
1. Taking backups of DB and not cleaning up.
2. File storage server was running on the same server without any cleanup policy.
We did not realize that these two can eat up all the disk so quickly and learnt our lesson.
Avoid things like these and it is better if you configure daily disk stats in your mail box for all production servers.
“The requested theme does not exist” – Wordpress Theme editor not loading
Had this one on wordpress blog of my friend who had this new theme installed.This theme was little more customized by the owner of the theme that the published one as my friend contacted him for some more customizations in this theme.
This problem came only after this extra customization and started reporting “The requested theme does not exist” when we wanted to use theme editor to make certain changes.
This is how we approached the problem :
a. We checked php error logs and foung nothing there.
b. Googled the phrase and found that this is some problem with the name of theme, which is written in style.css file. The person who changed the theme template did some changes in the name of theme and added some links and html over there. We tried cleaning that up and finally it was just like the name of the default theme. We matched almost all the things in theme name, theme link and description but it was not working for us.
c. Hit and trial started with Google and found that we needed to refresh the theme information i.e. theme name is cahced somewhere once you activate any theme. We did selected default theme of wordpress and then
selected our theme back and it worked.
d. Later I confirmed that theme name is saved in WP_options table when you activate any theme and that theme name is used while we initiate Theme editor.
e. So final solution is check the name of your theme which is in style.css file under theme folder and select some other theme and select your theme again and it should work.
Cheers!!


