Please note that LinuxExchange will be shutting down on December 31st, 2016. Visit this thread for additional information and to provide feedback.

Hello,

I want to do following by shell script. I have 2 linux servers backup and appl.

  1. From appl check \doc dir of backup server has any new files (created today)
  2. If \doc dir has today's created files, then check all files has today's time stamp or partial files were created today.
  3. I want to print the result on the screen.

I tried few things but as the files are on remote server, I am not able to create the correct script.

Thanks, Dip

asked 16 Aug '10, 22:32

dip's gravatar image

dip
11
accept rate: 0%




assuming hostname is hostname.domain

ssh hostname.domain "find /doc/* -ctime -1 -ls"

link

answered 17 Aug '10, 00:59

rfelsburg's gravatar image

rfelsburg ♦
6061618
accept rate: 25%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×16

Asked: 16 Aug '10, 22:32

Seen: 1,558 times

Last updated: 31 Aug '10, 01:24

powered by OSQA