Sponsored Content
Top Forums Shell Programming and Scripting finding creation date of a file Post 302468916 by jim mcnamara on Thursday 4th of November 2010 07:03:45 AM
Old 11-04-2010
Unix filesystems do not have a create date for files. There are a few oddball linux filesystems that have it.

There are three filetimes:

ls -c [filename] the last time file metadata changed (permissions, etc)
ls -u [filename] last access
ls -l or ls -t [filename] last time the file changed
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting the File Creation Date to a new format

I need to capture a file's creation/modification date and time and convert this to a different format, whilst I can easily get the existing format from a ls -l | awk ' { print $......}' or a cut command I do not know how to convert it to a desired format? I should add that at present the ls -l... (1 Reply)
Discussion started by: barney_clough
1 Replies

2. UNIX for Dummies Questions & Answers

Changing Creation Date to a Prespecified Date of a File In Unix

Dear Expert, Is there a command to do that in Unix? In such a way that we don't need to actually "write" or modified the content. -- monkfan (4 Replies)
Discussion started by: monkfan
4 Replies

3. Shell Programming and Scripting

How to get File creation date.

Hi All, I need to get file creation date. I have to access one file who's name is like... abc.log092308 and the date changes as per current date. And i am accessing this file next day. meance in above case i will access above file on 09-24-2008 Also one problem is that this file... (2 Replies)
Discussion started by: Jeevan Salunke
2 Replies

4. Shell Programming and Scripting

how to find creation date of file

Hi, I just need to know way of getting date of file when it was created. eg i have a file abc created on 23 aug. Now i need to know date of file i.e. 23 aug. How can i get that data. Thanks Sarbjit (7 Replies)
Discussion started by: sarbjit
7 Replies

5. OS X (Apple)

How to get the file creation date with find command

Is it possible to find all files based on the date of creation? And if so, how? I've been looking at the find command but it seems that only modification times are used as an option. (1 Reply)
Discussion started by: Straitsfan
1 Replies

6. Shell Programming and Scripting

finding the previous day date and creating a file with date

Hi guys, I had a scenario... 1. I had to get the previous days date in yyyymmdd format 2. i had to create a file with Date inthe format yyyymmdd.txt format both are different thanks guys in advance.. (4 Replies)
Discussion started by: apple2685
4 Replies

7. Shell Programming and Scripting

finding date numeral from file and check the validity of date format

hi there I have file names in different format as below triss_20111117_fxcb.csv triss_fxcb_20111117.csv xpnl_hypo_reu_miplvdone_11172011.csv xpnl_hypo_reu_miplvdone_11-17-2011.csv xpnl_hypo_reu_miplvdone_20111117.csv xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Discussion started by: manas_ranjan
10 Replies

8. UNIX for Advanced & Expert Users

Add file creation date as new column

Hi , I have a requirement to append file creation date to each row in a file for all the files in a directory. Please help Thanks, Pavan (2 Replies)
Discussion started by: Pavan Ram B S
2 Replies

9. UNIX for Dummies Questions & Answers

Change File Creation Date On Solaris

Dear Masters, I am using solaris 10. There is a requirement if a file created on Feb 1 or Feb 2, the creation date will be changed to Jan 31. Is there any command on Solaris to do that? Thanks, Kris (1 Reply)
Discussion started by: kris.adrianto
1 Replies

10. Shell Programming and Scripting

Script to print file name and its creation date

Hello , I am looking for a script to print file name and its last updated time. FILE CREATION-TIME FILE-NAME 24/10/2017 12:34 TDR-IU-8-2017.10.24.07:40:00-2017.10.24.07:45:00 when we run l command it print the directory and the files with details like permission,... (1 Reply)
Discussion started by: sadique.manzar
1 Replies
MKDIR(2)							System Calls Manual							  MKDIR(2)

NAME
mkdir - make a directory file SYNOPSIS
#include <sys/types.h> #include <sys/stat.h> int mkdir(const char *path, mode_t mode) DESCRIPTION
Mkdir creates a new directory file with name path. The mode of the new file is initialized from mode. (The protection part of the mode is modified by the process's mode mask; see umask(2)). The directory's owner ID is set to the process's effective user ID. The directory's group ID is set to that of the parent directory in which it is created. The low-order 9 bits of mode are modified by the process's file mode creation mask: all bits set in the process's file mode creation mask are cleared. See umask(2). RETURN VALUE
A 0 return value indicates success. A -1 return value indicates an error, and an error code is stored in errno. ERRORS
Mkdir will fail and no directory will be created if: [ENOTDIR] A component of the path prefix is not a directory. [ENAMETOOLONG] The path name exceeds PATH_MAX characters. [ENOENT] A component of the path prefix does not exist. [EACCES] Search permission is denied for a component of the path prefix. [ELOOP] Too many symbolic links were encountered in translating the pathname. (Minix-vmd) [EROFS] The named file resides on a read-only file system. [EEXIST] The named file exists. [ENOSPC] The directory in which the entry for the new directory is being placed cannot be extended because there is no space left on the file system containing the directory. [ENOSPC] The new directory cannot be created because there there is no space left on the file system that will contain the directory. [ENOSPC] There are no free inodes on the file system on which the directory is being created. [EIO] An I/O error occurred while making the directory entry or allocating the inode. [EIO] An I/O error occurred while reading from or writing to the file system. [EFAULT] Path points outside the process's allocated address space. SEE ALSO
chmod(2), stat(2), umask(2). 4.2 Berkeley Distribution August 26, 1985 MKDIR(2)
All times are GMT -4. The time now is 04:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy