Sponsored Content
Top Forums Shell Programming and Scripting File creation time in seconds Post 302416081 by jim mcnamara on Saturday 24th of April 2010 08:47:22 PM
Old 04-24-2010
scottn's code is fine for what you want

You may want to revisit your assumption: for performance reasons, file metadata is not always updated every time an open file is written to. Depending upon a lot of factors the directory could be stale and your test would think no file writes had occurred, when in fact they have.

See the attached white paper.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file creation time

i have to delete some files that were created on a particular date. is there any way to do that without affecting the files that were modified on the same date? (1 Reply)
Discussion started by: sskb
1 Replies

2. UNIX for Advanced & Expert Users

file creation date including seconds

Hi, Is anybody can help me to get the file creation date with seconds? -rw-r--r-- 1 opsc system 422550845 Aug 22 15:41 StatData.20020821 Thanks in advance Krishna (7 Replies)
Discussion started by: krishna
7 Replies

3. Programming

File creation time

Hi Everybody, Is their any functions to find out the file creation time in 'C' (2 Replies)
Discussion started by: mr_manii
2 Replies

4. Shell Programming and Scripting

find file creation time

Hello folks, I have a file, but it change every seconds, i use stats command to check its creation time, but it shows access,modify and change time same. Is there any other way to see the file creation date/time? Thanks (2 Replies)
Discussion started by: learnbash
2 Replies

5. UNIX for Advanced & Expert Users

How to get access time of a file upto the precision of seconds?

Hi , How can I get the last access time of a file upto the precesion of seconds in Unix. I cannot use stat as this is not supported. (10 Replies)
Discussion started by: kanus
10 Replies

6. Programming

How to search a file based on a time stamp backwards 10 seconds

Hi all, I'm after some help with this small issue which i'm struggling to work out a fix for. I have a file that contains records that all have a time stamp for each individual record, i need to search the file for a specific time stamp and then search back 10 seconds to see if the number... (2 Replies)
Discussion started by: sp3arsy
2 Replies

7. Red Hat

File creation time

Hi Everybody, I would like to know file creation date and time in linux. I went throgh google and forums got some information but from that i am not sure for my question. Please check the following information. "ls -l" ==> but it is just gives the last modified time and date of the file.... (2 Replies)
Discussion started by: mastansaheb
2 Replies

8. Shell Programming and Scripting

Time take between first and last file creation

Hi , In a folder I have multiple files. I want total time taken to write those files. Can you please suggest what will be the best way to go for it? (2 Replies)
Discussion started by: Anupam_Halder
2 Replies

9. AIX

Getting files through find command and listing file modification time upto seconds

I have to list the files of particular directory using file filter like find -name abc* something and if multiple file exist I also want time of each file up to seconds. Currently we are getting time up to minutes in AIX is there any way I can get file last modification time up to seconds. (4 Replies)
Discussion started by: Nitesh sahu
4 Replies

10. UNIX for Beginners Questions & Answers

Sftp file creation time

Hi Team, Could you please let me know ,how to find the file creation date time in SFTP server. i tred like , ls -ltr command only availble and not available like ls --full-time test.txt please help? Thanks (7 Replies)
Discussion started by: bmk123
7 Replies
GFS_PIO_OPEN(3) 														   GFS_PIO_OPEN(3)

NAME
gfs_pio_open - open a file in the Gfarm file system SYNOPSIS
#include <gfarm/gfarm.h> gfarm_error_t gfs_pio_open (const char * gfarm_url, int flags, GFS_File * gfp); DESCRIPTION
gfs_pio_open() opens a file in the Gfarm file system specified by gfarm_url, and returns a GFS_File structure to the address pointed by gfp. gfarm_url is a path name in the Gfarm file system, or a Gfarm URL in the form of gfarm://metaserver:port/path/name. Values of flags are constructed by a bitwise-inclusive-OR of the following list. Exactly one of the first three values should be speci- fied: GFARM_FILE_RDONLY Open for reading only. GFARM_FILE_WRONLY Open for writing only. GFARM_FILE_RDWR Open for reading and writing. GFARM_FILE_TRUNC If the file already exist and is a regular file, it will be truncated to length 0 if the open mode allows writing. RETURN VALUES
GFARM_ERR_NO_ERROR The function terminated successfully. GFARM_ERR_IS_A_DIRECTORY gfarm_url refers to a directory. GFARM_ERR_IS_A_SYMBOLIC_LINK gfarm_url refers to a symbolic link. GFARM_ERR_OPERATION_NOT_PERMITTED gfarm_url refers to not a regular file. GFARM_ERR_NO_SUCH_OBJECT A component used as a directory in gfarm_url does not exist. GFARM_ERR_NOT_A_DIRECTORY A component used as a directory in gfarm_url is not, in fact, a directory. GFARM_ERR_PERMISSION_DENIED The requested access to the file is not allowed, or one of the directories in gfarm_url did not allow search (execute) permission. Or, the authentication to the metadata server fails. GFARM_ERR_NO_MEMORY Insufficient memory was available. GFARM_ERR_INVALID_ARGUMENT flags is not valid. GFARM_ERR_GFARM_URL_HOST_IS_MISSING gfarm_url does not include a metadata server. GFARM_ERR_GFARM_URL_PORT_IS_MISSING gfarm_url does not include a port number of the metadata server. GFARM_ERR_UNKNOWN_HOST The metadata server cannot be resolved. GFARM_ERR_TOO_MANY_OPEN_FILES The process opens too many files. GFARM_ERR_TOO_MANY_OPEN_FILES_IN_SYSTEM The system limit on the total number of open files has been reached. GFARM_ERR_NETWORK_IS_UNREACHABLE Network is unrechable. GFARM_ERR_OPERATION_TIMED_OUT Connetion timeout occurs. GFARM_ERR_PROTOCOL Protocol error occurs. GFARM_ERR_BROKEN_PIPE Connection to the metadata server is broken. GFARM_ERR_PROTOCOL_NOT_SUPPORTED Specified authentication protocol is not supported. GFARM_ERR_AUTHENTICATION User authentication failed when connecting to the metadata server. Others An error except the above occurred. The reason is shown by gfarm_error_string(3). SEE ALSO
gfs_pio_close(3), gfs_pio_create(3), gfs_pio_eof(3), gfs_pio_error(3), gfs_pio_flush(3), gfs_pio_getc(3), gfs_pio_getline(3), gfs_pio_open(3), gfs_pio_putc(3), gfs_pio_putline(3), gfs_pio_puts(3), gfs_pio_read(3), gfs_pio_seek(3), gfs_pio_ungetc(3), gfs_pio_write(3) Gfarm 27 June 2010 GFS_PIO_OPEN(3)
All times are GMT -4. The time now is 02:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy