Solved

FTP DIR list with and without Year and/or Time

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…

734 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