Review your favorite Linux distribution.
Go Back > Blogs > anky.parmar1786
User Name


Rate this Entry

How to make new folder through scripting??

Posted 04-27-2013 at 05:28 PM by anky.parmar1786

Hi All,

I have one question.. I have two directories.. one is /logs and other is /logs_backup.
There are 5 folders in /logs directory with the name Jan,Feb,Mar,Apr and May .. now what I want to do is
that I want to move these folders log(Jan,Feb,Mar,Apr and May) in /logs_backup directory.
I want a script in which when script will run,it will check in /logs_backup directory that whether is Jan folder is there or not? If it is there then ok and if it is not there then create a folder with name of Jan.
Same way If I'll add any new folder in /logs directory with the coming months name like Jun,Jul etc so when the scripts run next time it will check first that whether Jun folder is available in /logs_backup or not? If it is available then no need to create but when if it is not there then create folder with the same name..If anybody help me on this then I shall be very thankful to him/her.. Thanks in advance.. Ankit
Posted in Uncategorized
Views 1882 Comments 1
« Prev     Main     Next »
Total Comments 1


  1. Old Comment
    While, within limits, you are free to post anything you want here this is not what your web log was meant for.
    Technical questions should be posted in the forum instead.
    Posted 04-27-2013 at 06:43 PM by unSpawn unSpawn is offline


All times are GMT -5. The time now is 03:58 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration