Help with copying the list of files from one location to other location
A) I would like to achive following actions using shell script. can someone help me with writing the shell script
1) Go to some dir ( say /xyz/logs ) and then perform find operation in this dir and list of subdir using
Pls note that "1367A49001CP0162" this will be the command line argument/parameter to be used while running the script
2) Then, I need to copy all the files present in "/tmp/nbkzkvc0xs/tracefile" file to some /tmp/Girish location
3) Once all the files are copied in /tmp/Girish location, i need to zip them in trace.zip file and then send this zip file on to my email id say xyz@gmail.com
Thanks,
GKG
---------- Post updated at 07:04 AM ---------- Previous update was at 05:52 AM ----------
B) Pls help me to write a shell script.
I have to to run mutiple SQL and store their result in excel file at some/tmp location.
Pls help how can I achieve the following things :
1) DB connection in shell script
2) once connection is made, how to run the sql inside shell script
eg: select * fromfile_table where file_id like'%9184H70140%';
Pls note that "9184H70140" this will be the command line argument/parameter to be used while running the script
3) store the result of above select SQL in the .csv or .xls file and then copy that file to /tmp location
Last edited by joeyg; 06-10-2013 at 04:12 PM..
Reason: next time please use code tags for your code and data
Hi All,
i'm trying to copy the 1.txt files (sample files) in to different path location using the below command.
But it is not copying the files , when i tried for single location able to copy the file.
can any one please assist here.
Please find the below path :-
/ckr_mkr1/licencekey... (2 Replies)
Hello All,
I want to copy all files from the list below to a path /qa0/repo/AS/CPY
(lnx17:qa0:/qa0/repo/AS>) ls -lrt | grep 'Feb 14'
-rw-rw-r-- 1 Ks1 qa0 39 Feb 14 20:11 HHH.dat
-rw-rw-r-- 1 Ks1 qa0 32 Feb 14 20:11 HHH1.dat
-rw-rw-r-- 1 Ks1 qa0 29 Feb 14 20:11... (3 Replies)
Hi,
I need to write a script the has to copy the files from folders and subfolders to the same folder structure located in another location.
Ex:
mainfolder1
file1,file2,file3 subfolder1(file1,etc) subfolder2(file1,etc) to another folder location of same folder structure.
rsync is not... (7 Replies)
Hi, i am new to shell scripting. i have a requirement to copy the files from a windows shared location( vendor will place the files here) to Linux server( my Informatica will pick the files from this location). Files should be loaded in the order in which they were placed in windows box.(Based on... (1 Reply)
I want equivalent of ftp in sftp for listing of files into local machine from sftp location.
ftp>ls -l list.txt
the above creates a file list.txt in the local machine's current directory.
sftp>ls -l list.txt
it is giving
Couldn't stat remote file: No such file or directory
is there... (1 Reply)
Hi,
I am new to unix and shell scripting.
Please help me in resolving the below issue.
In my shell script I have a variable which stores the different files with the path. Now I need to move all the files one by one to another location.
----
1.... (4 Replies)
Create a script that copies files from one specified directory to another specified directory, in the order they were created in the original directory between specified times. Copy the files at a specified interval. (2 Replies)
I need help in forming a script to copy files from one location which has a sub directory structure to another location with similar sub directory structure,
say location 1,
/home/rick/tmp_files/1-12/00-25/
here 1-12 are the number of sub directories under tmp_files and 00-25 are sub... (1 Reply)
I have a text list of about 3,000 file names (image files), which exist on a server and that I want to copy over to another location. I understand the Unix cp code, but what's the string to have it copy multiple files based on an external list?
Many thanks! (4 Replies)