Solved

FTP DIR list with and without Year and/or Time

Posted on 2000-03-03
3
481 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
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now