Results 1 to 6 of 6

Thread: Finding ctime,mtime and atime

  1. #1
    Join Date
    Oct 2009
    Posts
    67

    Finding ctime,mtime and atime

    Hello sir,

    Can any one help me out from this problem,I am using Linux operating system and I have done all type of directory and files operation in linux but I am unable to find the ctime, mtime and a time for particular file or directory.

    Can anyone tell me how to find these all things for my existing files and directories.

  2. #2
    Join Date
    Apr 2008
    Posts
    3,295

    Finding ctime,mtime and atime

    There are so many ways to find out the ctime,mtime and atime of a file or directory.

    When you use the ls -l command,all the files stored on the hard disk are listed after issuing this command.The timestamp of every files and directories are being listed and you can check the section of the timestamp of the files.

    You can execute the command as follows for a particular file:

    # ls -l My_file1.txt

  3. #3
    Join Date
    Nov 2005
    Posts
    3,026

    Finding ctime,mtime and atime

    Yes Dear,

    You can use the ls command which can show all what you requires.

    /home/danny/sedscripts> ls -lc
    total 48
    -rwxrwxrwx 1 dhawalen ccm_scd 23 Aug 10 10:17 ouput
    -rwxrwxrwx 1 dhawalen ccm_scd 147 Aug 10 10:27 sedscript
    -rwxrwxrwx 1 dhawalen ccm_scd 134 Aug 10 10:17 testdata
    ...........
    .......
    ....
    ...
    ..


    If you are getting another way to find out then please post me the way.

  4. #4
    Join Date
    May 2008
    Posts
    2,680

    Finding ctime,mtime and atime

    Hello,

    You can check it through another method which is a beautiful option provided by the Linux command library.You should go for the MAN help command which will show you a long list of options through which you can find more and more details.

    ls -ltr
    ls -lutr
    ls -lctr

    Check MAN page also.OK

    Thanks.

  5. #5
    Dr. V Guest

    Finding ctime,mtime and atime

    Take a look on the following demonstration -

    Code:
    $ sudo debugfs /dev/sda2
    [sudo] password for Melody:
    debugfs 1.41.3 (12-Oct-2008)
    debugfs:  cd /home/Melody
    debugfs:  stat filename
    debugfs:  quit
    The above described command are well enough to tell you the description of the file and directory time stamp in the third line from the top.

  6. #6
    Join Date
    Jan 2008
    Posts
    3,388

    Finding ctime,mtime and atime

    The above suggested command and procedure is well described but if you will look for a small piece of the written code.

    There is one small component is hidden in the group command,The small bit of code can be used to find the description of particular file and the command would be issued associated with the name of file.

    The command is inherited as follows -

    Code:
    $ stat <Name_of_file>

Similar Threads

  1. Need help finding a UPS for my current rig
    By Danvir in forum Hardware Peripherals
    Replies: 5
    Last Post: 21-11-2010, 02:28 AM
  2. Finding database name and PID
    By Adriana_andros in forum Software Development
    Replies: 5
    Last Post: 16-02-2010, 06:47 PM
  3. C : Implementation of ctime()
    By Gavyn in forum Software Development
    Replies: 4
    Last Post: 01-02-2010, 04:21 PM
  4. How to convert CString to CTime
    By Heather5 in forum Software Development
    Replies: 3
    Last Post: 03-09-2009, 09:13 PM
  5. Finding IP address
    By GaryK in forum Technology & Internet
    Replies: 2
    Last Post: 10-10-2008, 06:54 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,008,405.71036 seconds with 16 queries