Results 1 to 2 of 2

Thread: Find out information about my file - explaining ls command

  1. #1
    Contributors sweta's Avatar
    Join Date
    Feb 2005
    Location
    New Delhi
    Posts
    225
    Thanks
    20
    Thanked 12 Times in 12 Posts
    Rep Power
    12

    Default Find out information about my file - explaining ls command

    How do I find out more information about a file such as
    Who owns it?
    What it is?
    If it's executable or not
    How many hard links it has?
    When it was last accessed or changed?
    And so on?

    Answer:

    Use ls -l command and file command.

    Code:
    ls -l upcomming-master.doc
    Output:
    Code:
    -rw-r--r--    1 sweta sweta    88064 2007-01-08 01:39 upcomming-master.doc
    • -rw-r--r-- : File permission
    • 1 : How many hard links it has?
    • sweta sweta - Who owns it? (owner:group)
    • 88064 : File size
    • 2007-01-08 01:39 : When it was last accessed or changed?
    • upcomming-master.doc : File name


    Try out stat command which display file or filesystem status.
    Code:
    stat upcomming-master.doc
    Output:
    Code:
      File: `upcomming-master.doc'
      Size: 88064           Blocks: 184        IO Block: 4096   regular file
    Device: 341h/833d       Inode: 281265      Links: 1
    Access: (0644/-rw-r--r--)  Uid: ( 1000/   sweta)   Gid: ( 1000/   sweta)
    Access: 2007-01-10 01:29:54.072875104 +0530
    Modify: 2007-01-08 01:39:55.000000000 +0530
    Change: 2007-01-08 04:20:58.000000000 +0530

  2. #2
    Senior Member raj's Avatar
    Join Date
    Jun 2005
    Location
    Hyderabad
    Posts
    565
    Thanks
    57
    Thanked 40 Times in 37 Posts
    Rep Power
    13

    Default

    thanks for tutorial
    Raj
    Linux rulz.
    I have never turned back in my life ; I shall not do so today.. haha

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. unix find out ram usage command
    By charvi in forum Solaris/OpenSolaris
    Replies: 4
    Last Post: 10th April 2008, 02:22 AM
  2. Replies: 1
    Last Post: 17th January 2008, 03:26 PM
  3. Linux Find Out RAM CAS Latency Command
    By andrei048 in forum Linux hardware
    Replies: 1
    Last Post: 4th January 2008, 10:56 AM
  4. Implementation of find command in Perl
    By Bhushan in forum Shell scripting
    Replies: 2
    Last Post: 22nd August 2007, 12:15 PM
  5. Use memory command to find details under Fedora Linux
    By chiku in forum Getting started tutorials
    Replies: 0
    Last Post: 29th April 2007, 08:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •