OpenSolaris Solaris Forum  
     

Left Nav Register FAQ Members List Default Password Members List Linux Commands Search Today's Posts Mark Forums Read Right Nav

Left Container Right Container
 

Go Back   OpenSolaris Solaris Forum » Solaris General

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-11-2010, 11:11 AM
JDK JDK is offline
Junior Member
 
Join Date: Mar 2010
Posts: 6
Default Check timestamp of file and ftp query

Hi,

I am trying to check modified time of a file in some directory but i am not getting any output. Let me explain the scenario that can be more helpful:

File creation starts at 2am and file is completely created at 3am. I want to transfer file to some external server via ftp only after ensuring that the file is not in the process of creation i.e. transfer file only if it has been created.

My idea was to check the file modified time at two intervals i.e. at current instant and modified time of file again after 10 seconds. If both timestamps are equal, it means file has been created. But not able to check the timestamp of file.

Will appreciate any kind of help to do this.


Regards,
Reply With Quote
Sponsored Links

  #2 (permalink)  
Old 03-11-2010, 04:58 PM
Unregistered
Guest
 
Posts: n/a
Default

Why are you checking the timestamp?
why not check the size of file ?
just do ls -lrt and you will get the size along with time info
Reply With Quote
  #3 (permalink)  
Old 03-15-2010, 02:44 PM
JDK JDK is offline
Junior Member
 
Join Date: Mar 2010
Posts: 6
Default

Thanks a lot for the idea . It worked when i checked size of the file
I dont know why i was only checking time of file :S
thanks though.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:52 PM.


Powered by vBulletin. Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.