nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

create directory

This is a discussion on create directory within the Shell scripting forums, part of the Development/Scripting category; please help to inclucde create directory function in my shell file.i have got all d basic commands except create directory.please ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 11-24-2007, 07:41 PM
Junior Member
User
 
Join Date: Nov 2007
My distro: Debian
Posts: 1
Rep Power: 0
vyshas is on a distinguished road
Default create directory

please help to inclucde create directory function in my shell file.i have got all d basic commands except create directory.please tell me how to include it.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-26-2007, 08:28 AM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 481
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

Use mkdir command to create a directory.
__________________
May the force with you!
Reply With Quote
  #3 (permalink)  
Old 12-07-2007, 06:13 PM
anilvrathod's Avatar
Junior Member
User
 
Join Date: Dec 2007
Location: Pune
My distro: Red Hat
Posts: 13
Rep Power: 0
anilvrathod is on a distinguished road
Lightbulb

Dear Friend I am sending two script for diffrent purpost
script for create empty file
vi create empty file
#!/bin/bash
path="/path_where_u_want_to _create "

echo "Enter Count "
read COUNT

for (( i = 0 ; i <= $COUNT; i++ ))
do
touch $path"New_file_name{i}.txt"
done


Script for Create Durectory

vi createdir.sh
#!/bin/bash
path="/Path--------"

echo "Enter Count "
read COUNT

for (( i = 0 ; i <= $COUNT; i++ ))
do
mkdir $path"Directy_name${i}."
done


Anil V.Rathod
Linux System Administrator
Kalinga Data Link Pvt.Ltd Pune
Cell No. 9860062917
Reply With Quote
  #4 (permalink)  
Old 01-14-2008, 07:14 AM
Junior Member
User
 
Join Date: Jan 2008
My distro: Debian
Posts: 1
Rep Power: 0
SummerRain is on a distinguished road
Thumbs up

That great! I'm the new guy in linux shell script, i can learn most in here.thank a lot
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to create a bigfile (> 1Gb)? dnquynh Shell scripting 5 04-01-2008 06:58 PM
How to create Backup NeoGreen Linux software 1 08-12-2007 11:54 AM
removing a -- directory ricc Linux software 2 06-10-2006 08:40 AM
How to protect directory sAM Linux software 2 08-29-2005 10:07 PM
make directory wk3000sg Shell scripting 2 08-18-2005 05:41 PM


All times are GMT +5.5. The time now is 04:34 PM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36