The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
File Management: How do I move all JPGS in a folder structure to a single folder? guptaxpn Shell Programming and Scripting 4 06-11-2009 03:41 AM
How can I upload a zip folder on a unix path from my windows folder? ajit.yadav83 Windows & DOS: Issues & Discussions 2 01-29-2009 08:56 AM
Auto copy for files from folder to folder upon instant writing Bashar UNIX for Advanced & Expert Users 2 08-21-2008 03:44 PM
create folder in windows from unix while FTP Metalero de Oz UNIX for Dummies Questions & Answers 0 05-14-2008 02:22 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-20-2009
suigion suigion is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 14
how to create folder and sub-folder in UNIX ?

Hi all,

I have the following code to check the whether the folder is exist in my system.


Code:
if [ -d /home/batch/testing ]; then echo 'folder exist'; else echo 'folder not exist'; mkdir /home/batch/testing ; fi

When I remove the "testing" folder from "/home/batch" directory, the code is working fine. But when I remove folder "/batch/testing" from "/home" directory, the code is not working. Actually I want to test whether the code is able to create directory "/batch/testing" in "/home" folder.

Anybody know how to do that?
thanks ..

---------- Post updated at 11:03 PM ---------- Previous update was at 11:01 PM ----------

The error message I get is /home/batch: A file or directory in the path name does not exist.
  #2 (permalink)  
Old 07-20-2009
ryandegreat25 ryandegreat25 is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 236
try


Code:
mkdir -p /home/batch/testing

  #3 (permalink)  
Old 07-20-2009
suigion suigion is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 14
Quote:
Originally Posted by ryandegreat25 View Post
try


Code:
mkdir -p /home/batch/testing
Hi,

It works!!... thanks a lot ^^

-ISSUE SOLVED-
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:22 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0