- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: one simple query regarding ls -lrt output
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:08 AM
тАО03-03-2009 07:08 AM
I have got a question regarding the ls -lrt output. Feeling a bit embarrassed to raise this kiddie type question ... who cares! my boss don't have a id in this forum..
$ pwd
/home/user1
$ ls -lart
total 2566
-rw-r--r-- 1 user1 users 362 Apr 15 2003 .kshrc
-rw-r--r-- 1 user1 users 636 Apr 15 2003 .login
-rw-r--r-- 1 user1 users 535 Apr 15 2003 .profile
-rw-r--r-- 1 user1 users 591 Apr 15 2003 .cshrc
-rwxr-xr-x 1 user1 users 24576 Jan 26 2004 a.out
-rwxr-xr-x 1 user1 users 629 Sep 21 2005 spacevg
-rwxr-xr-x 1 user1 users 197 Nov 11 2005 final
drwxr-xr-x 2771 root root 48128 Jun 20 2006 ..
drwxr-xr-x 4 user1 users 96 Jan 15 2007 perf
-rw------- 1 user1 users 34506 Nov 13 11:13 .gpmhp-host1
-r-xr-xr-x 1 user1 users 1188080 Mar 7 11:08 tcpdump
-rwxr-xr-x 1 user1 users 149 Mar 19 17:36 .history
drwxr-xr-x 3 user1 users 1024 Mar 20 09:24 .
-rw------- 1 user1 users 2694 Mar 20 09:26 .sh_history
$ du -sk .
1244 .
$ df -g .
/home (/dev/vg00/lvol_home ) :
8192 file system block size 1024 fragment size
212992 total blocks 596 total free blocks
596 allocated free blocks 22912 total i-nodes
386 total free i-nodes 386 allocated free i-nodes
1073741835 file system id vxfs file system type
0 flags 255 file system name length
/home file system specific string
$
#########################
1) What is the first line from the output of ls -lrt signifies ? I read somewhere that it is total number of blocks used. Can I somehow map the no of the blocks to the du -sk output.
2)The second column of the output is the link count to that file, so against . and .. the values are 3 and 2771 respectively. What does that means ? I guess.. is my home dir /home/user1 is being referred from 2 other locations ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:13 AM
тАО03-03-2009 07:13 AM
Re: one simple query regarding ls -lrt output
## It signifies number of files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:16 AM
тАО03-03-2009 07:16 AM
Re: one simple query regarding ls -lrt output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:17 AM
тАО03-03-2009 07:17 AM
Re: one simple query regarding ls -lrt output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:17 AM
тАО03-03-2009 07:17 AM
Re: one simple query regarding ls -lrt output
When an option is specified that results in a listing of directory and/or file sizes in bytes or blocks (such as the -s or -l (ell) option), a total count of blocks, including indirect blocks, is also printed at the beginning of the listing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:23 AM
тАО03-03-2009 07:23 AM
Re: one simple query regarding ls -lrt output
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:25 AM
тАО03-03-2009 07:25 AM
Re: one simple query regarding ls -lrt output
find / -linkedto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:29 AM
тАО03-03-2009 07:29 AM
Re: one simple query regarding ls -lrt output
drwxr-xr-x 2771 root root 48128 Jun 20 2006 ..
drwxr-xr-x 3 user1 users 1024 Mar 20 09:24 .
Against . the ln count is 3 and against .. it is 2771, What are these numbers ? how can i verify it ? The hard link is not there for folders then who is referring to the home dir ? I have checked the ls -li output for inode numbers, but no answers ..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:32 AM
тАО03-03-2009 07:32 AM
Re: one simple query regarding ls -lrt output
total 32
-rw-rw-rw- 1 root sys 8 Mar 3 20:45 a
-rw-rw-rw- 1 root sys 19 Mar 3 20:46 b
shivaji@root/tmp/test1>find / -linkedto a
/tmp/test1/a
shivaji@root/tmp/test1>
shivaji@root/tmp/test1>
shivaji@root/tmp/test1>ln -s a c
shivaji@root/tmp/test1>ll
total 32
-rw-rw-rw- 1 root sys 8 Mar 3 20:45 a
-rw-rw-rw- 1 root sys 19 Mar 3 20:46 b
lrwxrwxrwx 1 root sys 1 Mar 3 20:59 c -> a
shivaji@root/tmp/test1>find / -linkedto a
/tmp/test1/a
shivaji@root/tmp/test1>find /tmp/test1 -linkedto a
/tmp/test1/a
shivaji@root/tmp/test1>ll
total 32
-rw-rw-rw- 1 root sys 8 Mar 3 20:45 a
-rw-rw-rw- 1 root sys 19 Mar 3 20:46 b
lrwxrwxrwx 1 root sys 1 Mar 3 20:59 c -> a
shivaji@root/tmp/test1>find / -linkedto c
/tmp/test1/c
shivaji@root/tmp/test1>ln a d
shivaji@root/tmp/test1>ll
total 48
-rw-rw-rw- 2 root sys 8 Mar 3 20:45 a
-rw-rw-rw- 1 root sys 19 Mar 3 20:46 b
lrwxrwxrwx 1 root sys 1 Mar 3 20:59 c -> a
-rw-rw-rw- 2 root sys 8 Mar 3 20:45 d
AS suggested earlier, you could verify it via
# find / -linkedto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-03-2009 07:35 AM
тАО03-03-2009 07:35 AM
Re: one simple query regarding ls -lrt output
drwxr-xr-x 2771 root root 48128 Jun 20 2006 ..
drwxr-xr-x 3 user1 users 1024 Mar 20 09:24 .
Let me check