Deleting a file located on another server


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Deleting a file located on another server
# 1  
Old 05-08-2008
MySQL Deleting a file located on another server

Hi,

I have successfully copied a file from one server to another using following command.

user1@server1# scp test.jsp user2@server2:/home/

Now i want to delete that copied file(test.jsp) from "server2" by running some command from server1.

Please help...

Last edited by SanketJOSHI; 05-08-2008 at 08:05 AM.. Reason: problem resolved
# 2  
Old 05-08-2008
Code:
ssh user@host "rm /path/to/file"

# 3  
Old 05-08-2008
Thank you so much "danmero"
its working fine now.

thanks again Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Deleting local server file from automated FTP script

Hi, I want to delete a file on the local server, while connected to remote server through FTP. I am using the below code for this $FTP_CMD -v -n $HOST <<*! >> $LOGFILE 2>&1 user $USER $PASSWORD cd $DIR ... (11 Replies)
Discussion started by: jhilmil
11 Replies

2. Shell Programming and Scripting

Calling script located at server-B from server A

i am using HP-UX, i am writing a shell script to call a script located at server-B from server A. i am able to ping Server-B from Server-A (working ), what all the environment varaibles i need to set to call a script located at server-B from server A. --------- #!/bin/sh... (3 Replies)
Discussion started by: only4satish
3 Replies

3. Shell Programming and Scripting

Problem in appending text to a file located in remote server

ssh -q "server_name sudo echo 'dbagroup::1234' >> sudo /etc/group"if i execute the above code its not getting appended. my requirement is to login to remote server and append dbagroup::1234 in /etc/group i am able to achieve this with tee -a command want to know why its not working with >>... (5 Replies)
Discussion started by: chidori
5 Replies

4. UNIX for Dummies Questions & Answers

sudo dmidecode where is the file located ?

Been through all my /sys /sbin /bin directories and can't seem to find it. (2 Replies)
Discussion started by: jcnewton13
2 Replies

5. UNIX for Advanced & Expert Users

why file automatically deleting in ftp server

Iam putting file in ftp server. iam doing ftp to transfer a file to ftp server but after sometime(10 sec) the file is automatically deleting in the ftp. Can i know why this happens. When my friend ftp the file to the same server , the file is not deleting aftersometime... it is there. Can... (1 Reply)
Discussion started by: nani1984
1 Replies

6. UNIX for Dummies Questions & Answers

How do install binary located on another server

Hi, For an automated install, an install script runs locally on the machine being installed on. This "install script" has to install programs that are located on the install server. How can I script this?I (1 Reply)
Discussion started by: mojoman
1 Replies

7. Shell Programming and Scripting

How do I go about finding a value located in one file in another?

Hi, I have to determine which VALID users made a failed loggon attempts on our server.To make a long story short, I have isolated the list of all the usernames and number of attempts in one file, and have isolated the valid users who have made failed loggon attempts in another file. I now have... (2 Replies)
Discussion started by: mojoman
2 Replies

8. Shell Programming and Scripting

Deleting a file from REMOTE Unix Server

Hi All, I have a requirement where i need to remove a file from Remote system. Can any one suggest me how to do this? My requirement is, i need to archive the file in a separate system. If the remore system is having files older than 7 years, then i need to delete that files from the remote... (2 Replies)
Discussion started by: Raamc
2 Replies

9. UNIX for Dummies Questions & Answers

how to know the device on which the file is located

Hi, i want to know on which device a file is located is there any command or anyway to know it thanks santosh (5 Replies)
Discussion started by: santosh149
5 Replies

10. UNIX for Dummies Questions & Answers

Deleting a file located on another server

Hi, I have successfully copied a file from one server to another using following command. user1@server1# scp test.jsp user2@server2:/home/ Now i want to delete that copied file(test.jsp) from "server2" by running some command from server1. Please help... (1 Reply)
Discussion started by: SanketJOSHI
1 Replies
Login or Register to Ask a Question