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