LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-31-2003, 08:40 AM   #1
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Rep: Reputation: 30
ls -la 4096


ls -la always shows 4096. And as I inderstand it is 4 MB or 2^12. Why it that?

Thanks
 
Old 08-31-2003, 01:08 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
? What are you referring to? Do you mean to say that ANY file on your system shows a filesize of 4096? Or are you saying that any file takes up AT LEAST 4096 bytes of data?

Try:
ls -lha as it will give you the human readable format of the size...

Cool
 
Old 08-31-2003, 08:17 PM   #3
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Original Poster
Rep: Reputation: 30
If you look below on the output, all directories have size 4096 ... or 4k
Why is that?


mike 4096 Aug 24 21:55 .mozilla
drwxrwxr-x 2 mike mike 4096 Aug 30 13:10 .mplayer
drwxr-xr-x 3 mike mike 4096 Aug 24 21:17 .nautilus
-rwxrwxrwx 1 mike mike 8196793 Aug 24 21:20 NVIDIA-Linux-x86-1.0-4496-pkg2.run
drwxrwxr-x 2 mike mike 4096 Aug 24 21:33 .qt
-rw------- 1 mike mike 0 Aug 24 21:17 .recently-used
-rw------- 1 mike mike 498 Aug 27 07:48 .rhn-applet.conf
drwx------ 2 mike mike 4096 Aug 26 21:50 .ssh
-rw------- 1 mike mike 403424 Aug 24 22:04 synaptic-0.42-1.i386.rpm
drwxrwxr-x 10 mike mike 4096 Aug 30 10:28 tx
-rw------- 1 mike mike 4296 Aug 31 12:04 .viminfo
-rw------- 1 mike mike 262 Aug 30 12:58 .Xauthority
drwxr-xr-x 2 mike mike 4096 Aug 24 21:
 
Old 08-31-2003, 08:20 PM   #4
mikeshn
Member
 
Registered: Feb 2002
Posts: 586

Original Poster
Rep: Reputation: 30
ls -lah
drwxr-xr-x 2 mike mike 4.0K Aug 24 22:12 .xine
-------------------------------------------------------------------------------
[mike@localhost mike]$ du -h .xine/
20K .xine
-------------------------------------------------------------------------------
Why two outputs of the same file are different?
 
Old 08-31-2003, 08:27 PM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
20K is the size of the total files in that directory.

4.0K is because your data and filesystem has been designed to be written in 4096 byte blocks. This is to reduce the number of inode's needed, you can alter that to 1K, 2K or 4K using tune2fs (assuming ext2/ext3).

Cool
 
  


Reply



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 Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
connection reset after 4096 bytes when using FTP to access remote server socrates71 Linux - Networking 2 10-20-2005 08:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration