nixCraft Linux Forum

nixCraft

Linux 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

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 01-10-2007, 01:32 AM
sweta's Avatar
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
My distro: Suse, RHEL, Vista
Posts: 154
Rep Power: 4
sweta will become famous soon enough
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
__________________
Friends - v-nessa - missyAdmin - LinuxChix
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 01-11-2007, 05:21 PM
raj raj is offline
Contributors
User
 
Join Date: Jun 2005
Location: Hyderabad
Posts: 151
Rep Power: 4
raj is on a distinguished road
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

Bookmarks


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 On

Similar Threads

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


All times are GMT +5.5. The time now is 03:52 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

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