Copy the newest file from a different server to your home server.
Hi all,
So I am on server 1, and I want to grab the newest file from a particular directory on server 2, and place this in a directory on server 1.
I am trying to use:
This works, and gets me the newest file in a particular directory. Using svn `ls -tr | tail -1` etc I can grab the newest file and copy it somewhere else if the newest file is in the directory i'm currently in.
The problem is using ls -tr | tail -1 in an attempt on server 2, as ls seems to only look in the directory i'm currently in and not in another.
Is there a way I can use that command in a way like this example:
The $foo here only looks in the directory i'm in, not user@host etc.
Hope this ramble makes sense!!
Alex
---------- Post updated at 07:58 AM ---------- Previous update was at 06:25 AM ----------
Just to add to this.
Is what I am attempting.
The ls -tr | tail -1 looks in host1, rather than the latest file in the directory ending /reports/...I need a way to grab the latest file from /reports/ and place it in host1.
Moderator's Comments:
Please use next time code tags for your code and data
i'm setting up a solaris 9 box to be my home network's DNS server. actually it's up and running, but it's set as a caching-only name server.
can i set it up to be the primary name server? what are the advantages if i can set it up to be a primary name server vs. a caching only name server? (3 Replies)
hi, which Command is used for copy a file from one server to another server, please provide the syntax and give one small example...
Thanks in advance
sarwan (2 Replies)
Hi All,
what is the comand to log off the remote server?
I have 2 servers A, B. I need to find all files older than 7 days on server B and copy over to server A. My logic is:
login the remote server:
=================
ssh hostB
cd /data/test
find . -mtime -7 -ls | awk '{print... (4 Replies)
I am getting the fallowing error when i am trying to execute the scp commomd in shell script
warning: You have no controlling tty. Cannot read confirmation.
warning: Authentication failed.
Disconnected; key exchange or algorithm negotiation failed (Key exchange failed.).
scp2: warning: ssh2... (1 Reply)
can some one help me to write a shell script that copy one file from one server to multiple server
ex:suppose i wnt to copy file abc.txt which is in server 1
to server2,server3,server4....:confused: (6 Replies)
Hi, I need a sample of a script that will check a specific directory multiple times throughout the day, and scp the newest file to another server.
Example: current file is misc_file.txt_02272011 (the last part is the date), once that has been secure copied, another one may come in later the... (1 Reply)
We would be migrating unix solaries to Linux redhat.
Basically source is unix and target is linux.
i would like to copy entire file system unix/source/* to target linux/souce/*
but target linux has only folder setup so what ever files copied need to be placed in the linux server with same... (8 Replies)
Hi All,
I am generating report in a Linux server and once the report is generated the report(.txt file) needs to be automatically saved in a Windows servers.
So i am looking for a script to transfer the file automatically from Linux server to Windows server?
Please advise.
Thanks... (3 Replies)
Hi ,
Is there any script to copy a files (weblogic bianary + silent.xml ) from one server (linux) to another servers and then execute the copy file.
We want to copy a file on multiple servers and run the installation.
Thanks (1 Reply)
:wall:Hi all,
I have two servers : server A and server B
Weekly wise i use to receive files to server A to one particular location say /source/location . NOTE: In this location there will be other files also present other than these weekly arrival 18 files.
My task :
i need a... (7 Replies)
Discussion started by: karmegam
7 Replies
LEARN ABOUT REDHAT
nwrevoke
NWREVOKE(8) nwrevoke NWREVOKE(8)NAME
nwrevoke - Revoke a Trustee Right from a directory
SYNOPSIS
nwrevoke [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] [ -o object name ] [ -t type ] [ -r rights ] file/directory
DESCRIPTION
nwrevoke revokes the specified bindery object with the corresponding trustee rights from the directory.
nwrevoke looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more informa-
tion. Please note that the access permissions of $HOME/.nwclient MUST be 600 for security reasons.
OPTIONS -h
-h is used to print out a short help text.
-S server
server is the name of the server you want to use.
-U user
user is the user name to use for login.
-P password
password is the password to use for login. If neither -n nor -P are given, and the user has no open connection to the server, nwrevoke
prompts for a password.
-n
-n should be given if no password is required for the login.
-C
By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off
this conversion by -C.
-o object name
The name of the object to be added as trustee.
-t object type
The type of the object. Object type must be specified as a decimal value. Common values are 1 for user objects, 2 for group objects and
3 for print queues. Other values are allowed, but are usually used for specialized applications. If object type is not specified, object
name is taken as NDS name.
file/directory
You must specify the file/directory from which to remove the object as trustee. If you specified -S, it must be fully qualified NetWare
notation for DOS namespace. Otherwise it must be file or directory mounted to your system using ncpfs.
Example:
nwrevoke -S NWSERVER -o linus -t 1 'src:bsd_src'
With this example, user linus is removed as trustee from the bsd_src directory on the src volume on server NWSERVER.
nwrevoke -o linus -t 1 /home/vana/ncpfs/nwserver/src/bsd_src
With this example, user linus is removed as trustee from the bsd_src directory.
AUTHORS
nwrevoke was written by Volker Lendecke with the corresponding NetWare utility in mind. See the Changes file of ncpfs for other contribu-
tors.
nwrevoke 7/9/1996 NWREVOKE(8)