Shell script folder creation


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Shell script folder creation
# 1  
Old 03-25-2012
Java Shell script folder creation

hi
can any one help me in shell scripting
where in my requirement is to
write a shell script where in if i run that script i should copy all the .doc files from one system to another systems within a network like from parent folders to child folder
example
parent folder A within parent folder all the .doc files and with in parent folder subfolder or child folder all the .doc files like wise
when it copies all the files iot should store in a system by creating a new folder in a first system

its really urgent

thanks in advaance
# 2  
Old 03-25-2012
Please read forum rules #11

Please provide an example of what you have and what you need :
a little example is often easier to get than a long blurred explaination
# 3  
Old 03-25-2012
Java shell script folder creation

ok ill just try to explain u with an example
suppose that there are 10 machines in a network and from each machine i need to copy a .doc files in machine 1 so i need a sheel script wherein if a run this particular script i sholud be able to copy all .doc files from each machine to machine 15though this .doc files are present in a parent folder or a child folder this script shold check that root folder and sub folder for .doc files

and also it needs to create a new folder in machine 1 to store all this .doc files in that particular location

hope u got my requirements,i am looking forward for reply
thanks in advance
# 4  
Old 03-25-2012
Please give an example :
are you willing to copy
Code:
server1:/dir1/*.doc
server2:/dir2/*.doc
server3:/dir3/*.doc

respectively to
Code:
target_server1:/dir_serv1/*.doc
target_server1:/dir_serv2/*.doc
target_server1:/dir_serv3/*.doc

???
Please clarify
# 5  
Old 03-26-2012
Yes i want to copy . doc files from source server to destination server
# 6  
Old 03-26-2012
on server_source

Code:
cd $source_dir
for i in *.doc
do
scp -p $i target_server:/$target_dir/$i
done

 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Request for Shell script to move files from Subfolder to Parent folder and delete sub folder

Hi Team, I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder. Eg: parent folder --> /Interface/data/test/IN Sub folder -->/Interface/data/test/IN/Invoice20180607233338 Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies

2. Shell Programming and Scripting

Script to move files and Creation of folder structure

We are receiving few zipped files in one location say : apple/oranges/incoming All .zip files are placed here in incoming folder. So few of the files are password encrypted. There are only 10 zipped files, so we are planning to create a script which will pick that zip file from incoming... (1 Reply)
Discussion started by: Sidhant
1 Replies

3. Shell Programming and Scripting

Shell script for user account Creation

Hi Folks, I had a request to create the user request. Between, I just write a script a create, Update Geos, and update the password. My script as below: The error message, what I am getting is all the users are updated with the same Goes value.. #!/bin/bash for i in `cat users.txt`;do... (2 Replies)
Discussion started by: gsiva
2 Replies

4. Shell Programming and Scripting

How can i sort this listing in PYTHON by folder creation?

Is there anything i can do about this code? I need to sort it by folder creation, the newest will be first ... thx :) for dirname in postme: dirname = os.path.abspath(dirname) if dirname: ... (2 Replies)
Discussion started by: ZerO13
2 Replies

5. Shell Programming and Scripting

CSV File Creation Within Shell Script

Hi All, I am trying to create a CSV file within a shell script test.ksh and the code snippet is something like below: #!/usr/bin/ksh # Set required variables. . $HOME/.prof # Output file path Group1=/tmp/G1.csv Group2=/tmp/G2.csv Group3=/tmp/G3.csv $ORACLE_HOME/bin/sqlplus -s... (2 Replies)
Discussion started by: swasid
2 Replies

6. Shell Programming and Scripting

Bash shell script for user creation in solaris

Hi All, I am new to shell scripting and have a task which need to be completed ASAP. I have searched all the forum and couln't find excat script which could run on solaris.can someone give me the fully working script for below. Bash shell script to create user account with paraments as... (1 Reply)
Discussion started by: sintilash
1 Replies

7. Shell Programming and Scripting

shell script Partition Creation

Hello all How is it going I want Shell Patch The work of the following division of the disk Can this 200 MB EXT3 /boot 20 Gb EXT3 / 10 GB Swap End Of Space ( Linux LVM ) Found a similar script can be customized by you to be the work required #!/bin/bash VSIZE=200 fdisk /dev/hda... (1 Reply)
Discussion started by: x-zer0
1 Replies

8. Shell Programming and Scripting

Need help in a shell script to edit a tablespace creation script.

Hi, CREATE TABLESPACE aps_blob_large01 DATAFILE '/c2r6u13/u03/oradata/qnoldv01/aps_blob_large0101.dbf' SIZE X 270532608 REUSE DEFAULT STORAGE (INITIAL 134217728 NEXT... (2 Replies)
Discussion started by: rparavastu
2 Replies

9. UNIX for Dummies Questions & Answers

folder creation

Hi, help me to write a shell script to check the folder is exsting as with the current date in specified path,and if not exsting ,i need to create a folder with name as the current date Thanks (1 Reply)
Discussion started by: rujupriya
1 Replies

10. Shell Programming and Scripting

user creation using shell script for JSP

hello friends, I have problem. We want to create user from jsp(browser based) on our linux server. How we can do that ? or How do we create a user with shell programming by taking arguments and checking with the existing users and if the user exist it should display the message the user exists... (1 Reply)
Discussion started by: jarkvarma
1 Replies
Login or Register to Ask a Question