nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Find out information about my file - explaining ls command

This is a discussion on Find out information about my file - explaining ls command within the Getting started tutorials forums, part of the Linux Getting Started category; How do I find out more information about a file such as Who owns it? What it is? If it's ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Linux answers from nixCraft.


Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-01-2007, 12:32 AM
sweta's Avatar
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
OS: Suse, RHEL, Vista
Posts: 199
Thanks: 12
Thanked 9 Times in 9 Posts
Rep Power: 7
sweta has a spectacular aura about sweta has a spectacular aura about
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
__________________
Reply With Quote
  #2 (permalink)  
Old 11-01-2007, 04:21 PM
raj's Avatar
raj raj is offline
Senior Member
User
 
Join Date: Jun 2005
Location: Hyderabad
OS: Fedora, Debian Linux
Posts: 307
Thanks: 42
Thanked 8 Times in 8 Posts
Rep Power: 6
raj will become famous soon enough raj will become famous soon enough
Default

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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
unix find out ram usage command charvi Solaris/OpenSolaris 4 10-04-2008 02:22 AM
UNIX command to find out whether particular process of a particular user is running Santosh Sharma Shell scripting 1 17-01-2008 03:26 PM
Linux Find Out RAM CAS Latency Command andrei048 Linux hardware 1 04-01-2008 10:56 AM
Implementation of find command in Perl Bhushan Shell scripting 2 22-08-2007 12:15 PM
Use memory command to find details under Fedora Linux chiku Getting started tutorials 0 29-04-2007 08:35 PM


All times are GMT +5.5. The time now is 11:45 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38