copy the latest file in the remote server's directory
Hi Expert Team,
I performed the below piece of code to copy the latest file in the remote server's directory to the same server's other directory.
But it is not working properly.
How can i handle this? Can you please help me..?
Thanks,
Kanda
Last edited by Yogesh Sawant; 08-10-2009 at 10:25 AM..
Reason: added code tags
I have ssh keys setup and running properly between two servers. I have a Korn shell script that is logging into the remote server and needs to backup the authorized_keys and/or authorized_keys2 files.
The following syntax works perfectly
-------------------------------------
ssh... (1 Reply)
Hi,
Just wanted to know, how can I ftp/transfer/copy a (design.tar.gz) archive from a Unix Server (sdmc222.sdmc.cp-srv.com) which is at a remote location, to my Windows Desktop. Obviously, it is not possible at cmd prompt on my Windows using the following commands :-
ftp... (3 Replies)
Hi All,
I am in the directory a/b/processed
the files in this directories are
-rw-r--r-- 1 owb users 330 Aug 8 chandantest.txt_08082008
-rw-r--r-- 1 owb users 220 Aug 7 chandantest.txt_07082008
-rw-r--r-- 1 owb users 330 Aug 6... (3 Replies)
Hi Team,
I wish to copy the latest file of pattern "MyFile*" to some other location.
I need to do all the operation in a single command separated by |.
ls -rt <MyFile*> | tail -1 | <copy command>.
How can I do?
Please help me.
Thanks,
Kanda (2 Replies)
Hi
How to copy a file from remote server and preserve timestamp. Please not, i have to pass username and password to connect to the remote server in the shell script.
Can this be achieved with simple ftp ? are there any options in ftp ?
Thanks (4 Replies)
How to FTP the latest file, based on date, from a remote server through a shell script?
I have four files to be FTP'ed from remote server.
They are of the following format.
build1_runtime_mmddyyyy.txt
build2_runtime_mmddyyyy.txt
build3_runtime_mmddyyyy.txt
buifile_count_mmddyyyy.txt
... (9 Replies)
Hi,
I wanted to copy monthly generated csv file(s)( of latest date) at one server to my current server.
So I wrote the following script, but does not work.
The script is invoked on my current server
Can you please help?
!/bin/ksh
#. /apps/comp/
cd /apps/di/dev/import/paper
ssh hpqad02... (3 Replies)
Hi All,
One job in unix server will generate .csv files daily. I need to copy the latest of these .csv file from the unix server to the shared drive/folder in windows through unix script. My shared folder will look something like
W:\some folder(for example). Could any one of you please help... (3 Replies)
Hi there,
I have a problem in my script,
I need to check whether file exists in remote server or not,
if the file exists, then stop copy
else copy the file to the server..
my code is something like this
while read $server
do
if ssh $server "cd $directory_name; if ; then echo "Error:... (2 Replies)
STG-IMPORT(1) StGit Manual STG-IMPORT(1)NAME
stg-import - Import a GNU diff file as a new patch
SYNOPSIS
stg import [options] [<file>|<url>]
DESCRIPTION
Create a new patch and apply the given GNU diff file (or the standard input). By default, the file name is used as the patch name but this
can be overridden with the --name option. The patch can either be a normal file with the description at the top or it can have standard
mail format, the Subject, From and Date headers being used for generating the patch information. The command can also read series and mbox
files.
If a patch does not apply cleanly, the failed diff is written to the .stgit-failed.patch file and an empty StGIT patch is added to the
stack.
The patch description has to be separated from the data with a --- line.
OPTIONS -m, --mail
Import the patch from a standard e-mail file.
-M, --mbox
Import a series of patches from an mbox file.
-s, --series
Import a series of patches from a series file or a tar archive.
-u, --url
Import a patch from a URL.
-n NAME, --name NAME
Use NAME as the patch name.
-p N, --strip N
Remove N leading slashes from diff paths (default 1).
-t, --stripname
Strip numbering and extension from patch name.
-i, --ignore
Ignore the applied patches in the series.
--replace
Replace the unapplied patches in the series.
-b BASE, --base BASE
Use BASE instead of HEAD for file importing.
--reject
Leave the rejected hunks in corresponding *.rej files.
-e, --edit
Invoke an editor for the patch description.
-d, --showdiff
Show the patch content in the editor buffer.
-a "NAME <EMAIL>", --author "NAME <EMAIL>"
Use "NAME <EMAIL>" as the author details.
--authname AUTHNAME
Use AUTHNAME as the author name.
--authemail AUTHEMAIL
Use AUTHEMAIL as the author e-mail.
--authdate AUTHDATE
Use AUTHDATE as the author date.
--sign
Add a "Signed-off-by:" to the end of the patch.
--ack
Add an "Acked-by:" line to the end of the patch.
STGIT
Part of the StGit suite - see linkman:stg[1]
StGit 03/13/2012 STG-IMPORT(1)