how to find today's files & send to another server?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to find today's files & send to another server?
# 1  
Old 04-12-2006
how to find today's files & send to another server?

Hi All,

My script has to find todays modified( less than 24 hrs) files & send it another server using SCP.

what I wrote is

find . -type f -mtime -1 | xargs ls -ltr ## to find today's files, but its giving my sh_history file also, I don't require this file at all.

scp userid@serverBhostname:/put/here ## to send files to another server.

I found these above two commands ( find & scp) in the net. I don't know how to customize to solve my problem.

Please let me know how to solve this.
Your help will be greatly appreciated.

Thanks in Advance
Zinu
# 2  
Old 04-13-2006
still am struggling with that problem, Guys pls help me

Thanks in Advance...
zinu
# 3  
Old 04-13-2006
Use:
Code:
find . -type f -mtime 0

Cheers
# 4  
Old 04-14-2006
Thanks Klashixx...

My problem is how to use the output (the files) to send to another server by using SCP.

Thanks in Advance...
zinu
# 5  
Old 04-14-2006
Use

try ...
Quote:
scp /tmp/source/example.txt test@test.org:/tmp/target/example.txt
Cheers
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find files from only today

This finds files from yesterday and today. I need it to find only files from today. sudo find /home/andy -iname "*.sh" -mtime -1 -print (8 Replies)
Discussion started by: drew77
8 Replies

2. Shell Programming and Scripting

Error when connecting to remote server to find files with timestamp today's day

I am connecting to remote server and try to check if files with timestamp as Today's day are on the directory. Below is my code TARFILE=${NAME}.tar TARGZFILE=${NAME}.tar.gz ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly; Today=`date +%Y%m%d`; if ;then echo "We... (1 Reply)
Discussion started by: digioleg54
1 Replies

3. UNIX for Advanced & Expert Users

Find all files other than first two files dates & last file date for month

Hi All, I need to find all files other than first two files dates & last file date for month and month/year wise list. lets say there are following files in directory Mar 19 2012 c.txt Mar 19 2012 cc.txt Mar 21 2012 d.txt Mar 22 2012 f.txt Mar 24 2012 h.txt Mar 25 2012 w.txt Feb 12... (16 Replies)
Discussion started by: Makarand Dodmis
16 Replies

4. Shell Programming and Scripting

How to find files created today in a particular directory?

Dear All, I want a Hp Ux command to find out the files created today in a particular directory or mountpoint. Kindly help. Thanks Bhaskar (10 Replies)
Discussion started by: sudiptabhaskar
10 Replies

5. Shell Programming and Scripting

Find & Replace string in multiple files & folders using perl

find . -type f -name "*.sql" -print|xargs perl -i -pe 's/pattern/replaced/g' this is simple logic to find and replace in multiple files & folders Hope this helps. Thanks Zaheer (0 Replies)
Discussion started by: Zaheer.mic
0 Replies

6. Shell Programming and Scripting

Getting all the files modified today & store the names in a variable as , separated

Hi all, I have a question. I have a folder. I want to find the list of files that are modified today and store all those file names in a variable as comma separated values. I thought of using "find . -mtime 0" command to find the list of files modified today. Also to get those values of file... (10 Replies)
Discussion started by: ananthi_ku
10 Replies

7. Shell Programming and Scripting

Find files older then today & display with timestamp info

Small query- I want to do some operation on all the files older then today. Before I do that operation, i want to verify if the command works properly or not. Surprisingly, the command below returns me file, which are created today - find /mrk_archive/PG/ftp/incomming/gbs/2008 -type f... (2 Replies)
Discussion started by: kedar.mehta
2 Replies

8. IP Networking

How to find out why the network was down?, now the server is up & running

Hi there, solaris server was not reachable. Now the server is up & running I have to investigate the network logs (where i can get these logs)as such network issues are happening frequently. How to find why the netwrok has gone down ?? Thanx (1 Reply)
Discussion started by: Iqan Zahera
1 Replies

9. Shell Programming and Scripting

find files older than 30mins,count and send mail

Hi all, I wrote this script to find files older than time parameter, count the number of files, and send an email to me that some files are in a particular folder. For the particular path, the script should wait delay parameter before running again. For example, assuming the input file looks... (4 Replies)
Discussion started by: kayarsenal
4 Replies

10. Shell Programming and Scripting

Find files older than 20 days & not use find

I need to find files that have the ending of .out and that are older than 20 days. However, I cannot use find as I do not want to search in the directories that are underneath the directory that I am searching in. How can this be done?? Find returns files that I do not want. (2 Replies)
Discussion started by: halo98
2 Replies
Login or Register to Ask a Question