Sponsored Content
Operating Systems Solaris How to delete the files from local host to remote host Post 302112033 by ennstate on Saturday 24th of March 2007 02:39:08 PM
Old 03-24-2007
Using ssh or rsh

Using SSH,

1) Prints the files modified in your local server,

HTML Code:
 ssh -l username localhost "find /dir-path -name '*.gz' -o -name '*.dmp' -o -name '*.z' -mtime +2 -print "
2) Add command to remove them,

HTML Code:
 ssh -l username localhost "find /dir-path -name '*.gz' -o -name '*.dmp' -o -name '*.z' -mtime +2 -ok rm {} "
or
HTML Code:
ssh -l user localhost "find /home/inangan -name '*.gz' -o -name '*.dmp' -o -name '*.log' -mtime +2 | xargs rm -i"
Here mtime +2 signifies the files that are not modified within last 48 hours.

Similary You can also give a try to rsh.

Please let us know if this works.

Thanks,
Nagarajan Ganesan.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Backing up files to a remote host question.

I need to know how to successfully back up(and compress) files from a local machine to a remote host. Will this work? tar -cvf backup.tar -C /user/somedir | gzip backup.tar | rsh some.domain.com/user/somedir thanks in advance! (3 Replies)
Discussion started by: WeNdeL
3 Replies

2. Solaris

Tar files, transfer to remote host and delelte source

Hi, I´m having a problem here. I have a directory that holds many subdirs and files (by many I mean MANY thousands). What I want to do is make blocks of these files and transfer them block by block to a remote host; but once a given file is already placed in the remote host, the script must... (0 Replies)
Discussion started by: Dago
0 Replies

3. Shell Programming and Scripting

Run a shell script from one host which connext to remote host and run the commands

I want to write a script which would run from one host say A and connect to other remote host B and then run rest of commands in that host. I tried connecting from A host to B with SSH but after connecting to host B it just getting me inside Host B command prompt. Rest of the script is not running... (6 Replies)
Discussion started by: SN2009
6 Replies

4. Shell Programming and Scripting

running commands to remote host from centralized host

Gurus/Experts We have a centralized UNIX/Solaris server from where we can actually ssh to all other UNIX/Solaris servers...I need to write a script that reside on this centerlized server and do FileSystem monitoring (basically run df -h or -k) of other remote servers and then send an email to me... (6 Replies)
Discussion started by: anjum.suri
6 Replies

5. UNIX for Advanced & Expert Users

Help! How to find the local host after few ssh hops to remote host???

I do a ssh to remote host(A1) from local host(L1). I then ssh to another remote(A2) from A1. When I do a who -m from A2, I see the "connected from" as "A1". => who -m userid pts/2 2010-03-27 08:47 (A1) I want to identify who is the local host who initiated the connection to... (3 Replies)
Discussion started by: gomes1333
3 Replies

6. UNIX for Dummies Questions & Answers

Transfer large number of files host to host

Hello.... I have two servers, one has an empty / and the other has a subdirectory with a large number (4 gig) with many, many files. I need a way to transfer the files en masse from the server with the large number of files to the one that is essentially blank. I don't have space on the used... (16 Replies)
Discussion started by: blaine.miller
16 Replies

7. Shell Programming and Scripting

scp or rsync multiple files in parallel from a remote host

Hi. I'm trying to speed up an rsync command by running it in parallel. There's no real option for this other than if the files are in multiple directories (which they're not). And even then there's no way of knowing if rsync has succeeded as the process is running in the background .. and... (4 Replies)
Discussion started by: Big_Jeffrey
4 Replies

8. Shell Programming and Scripting

Copy a file from local host to a list of remote hosts --- perl script

Hi friends, i need to prepare a script ( in perl) i have a file called "demo.exe" in my local unix host. i have a list of remote hosts in a file "hosts.txt" now i need to push "demo.exe" file to all the hosts in "hosts.txt" file. for this i need to prepare a script(in perl, but shell... (5 Replies)
Discussion started by: siva kumar
5 Replies

9. Shell Programming and Scripting

Pause processes in remote host and resume execution in another remote host

Hi, Given addresses of 2 remote machines, using a shell script is it possible to get the state of running processes in "src" stop all the processes in "src" exit out of "src" ssh into "dest" resume the state of executing processes captured in step 1 in "dest" Assumption: "src" is... (3 Replies)
Discussion started by: Saeya Darsan
3 Replies

10. Shell Programming and Scripting

Copy local files to single remote host but multiple folders using rsync

I'm trying to copy a file myfile.scr from my local Linux server to multiple folders on remote AiX server using single rsync command. Below command helps me copy the file "myfile.scr" from my localhost to a remote host folder "/app/deployment/tmpfiles" rsync --delay-updates -F --compress... (1 Reply)
Discussion started by: mohtashims
1 Replies
ipsec_config_delete(1M) 												   ipsec_config_delete(1M)

NAME
ipsec_config_delete - delete configuration records from the HP-UX IPSec configuration database and delete certificate files SYNOPSIS
object_name ip_addr object_name object_name object_name object_name DESCRIPTION
The command deletes configuration records from the configuration database and certificate data. If HP-UX IPSec is active and running, the data (IPsec policy, authentication record or bypass list entry) is also deleted from the runtime policy database. If you delete IPsec policies that have active Security Associations (SAs), HP-UX IPSec removes the SAs from the Security Association Database (SADB) and sends a delete notification to the remote system. If HP-UX IPSec removes an IKE policy, the associated IPSec SAs can remain active, but no IKE control messages can be sent. The command deletes the certificate for the local system and the related private key file from the directory. It does not delete certifi- cates for CAs or Certificate Revocation Lists (CRLs). To delete these objects, you must manually delete the files in the directory. You can use the command to display the file names with the subject names for the CA certificate files and the issuer names for the CRL files. You cannot delete the configuration object. Options and Operands The command recognizes the following options and operands: object_name Specifies the name of the object you are deleting. Do not use this argument when deleting a configuration object. You cannot delete the host, IKEv1, or IKEv2 policies. ip_addr Specifies the IP address of the entry in the bypass list you are deleting. EXAMPLES
The following command deletes the host IPsec policy named AUTHOR
was developed by HP. FILES
configuration database. default profile file. SEE ALSO
ipsec_admin(1M), ipsec_config(1M), ipsec_config_add(1M), ipsec_config_batch(1M), ipsec_config_export(1M), ipsec_config_show(1M), ipsec_migrate(1M), ipsec_policy(1M), ipsec_report(1M). HP-UX IPSec Software Required ipsec_config_delete(1M)
All times are GMT -4. The time now is 10:01 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy