Solved

FTP DIR list with and without Year and/or Time

Posted on 2000-03-03
3
489 Views
Last Modified: 2008-03-03
I use FTP sessions to a UNIX box to capture the Date/Time stamp of files for a monitoring application.  I use a DIR list which I belive is similar to an ls -l command.  UNIX for some reason gives me the Year if the file is older than I think 6 months and gives me the time if the file is younger than 6 months old.  This is causing processing problems with this application for year end processing and times when my monitoring system thinks it is just before midnight and the other system thinks it is just after midnight. (Due to systems being out of synch with their dates)

My question is this, do all or most unix system function this way (Showing time or year in the dir list)?
 And do they all use 6 months as the determination to display the time or year?
0
Comment
Question by:louy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 

Accepted Solution

by:
sivaran earned 100 total points
ID: 2581537
Yes all the unix m/c do give the time format in 'month date year' for
files which are > 6 months old.   Files  modified within six months show
`month date time'.  
0
 

Author Comment

by:louy
ID: 2581597
Is it 180 days they use or 182 or 183 for 1/2 of a year?
0
 
LVL 40

Expert Comment

by:jlevie
ID: 2586555
If you've got login privs on the remote (as opposed to anon ftp access) there are better, less ambiguous, ways to get the file dates. As to how the data/no date determination is done, well it depends on what ftp server is in use. I don't think it's documented for any of the servers (at least I've never seen such documentation).
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question