LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-09-2012, 10:40 PM   #1
tushar_pandey
Member
 
Registered: Jun 2012
Location: ghaziabad , delhi , india
Posts: 105

Rep: Reputation: Disabled
difference between fdisk and df ..... in ubuntu 12.04


Hi , i am facing a problem , its not a problem its a confusion ,

when i am using "sudo fdisk -l" at that time i am getting output like this in the shell .
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

when i am using , df -l , at that time i am getting output like this in screen
Filesystem 1K-blocks Used Available Use% Mounted on

so please can you tell me why this two different blocks of memory are introduced by the shell .
 
Old 08-09-2012, 11:15 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
They're not introduced by the shell. The HDD has a physical layout, fdisk is
taking that. The file-system has a logical layout, w/ yet another block-size.
And the makers of ls have chosen something different yet again.

Nothing to do w/ the shell.


Your complaint is like blaming a road for the fact that its length can
be expressed in meters, miles or li. ;}



Cheers,
Tink
 
1 members found this post helpful.
Old 08-09-2012, 11:52 PM   #3
tushar_pandey
Member
 
Registered: Jun 2012
Location: ghaziabad , delhi , india
Posts: 105

Original Poster
Rep: Reputation: Disabled
"Your complaint is like blaming a road for the fact that its length can be expressed in meters, miles or li. ;}"

but i am asking because i created a directory named sufi_songs
total 23096
-rw-r--r-- 1 daa daa 9031388 Aug 9 11:32 delhi610(www.songs.pk).mp3
-rw-r--r-- 1 daa daa 14614837 Oct 2 2011 [Songs.PK] Rockstar - 04 - Kun Faya Kun.mp3
by properties :: 2 items, totalling 23.6 MB

now please think about this , 23096 blocks , if i take 512 as a block size than i will never reach at 23.6 mb but if i take 1kb as size than i can reach 23.6 mb ,

so how can i find that at which time , in which dierectory , which type of block size( 512 or 1024 ) is used !
 
Old 08-10-2012, 12:34 AM   #4
SunlightRider
LQ Newbie
 
Registered: Aug 2012
Posts: 4

Rep: Reputation: Disabled
think about it...

miles or kilometers?
 
Old 08-10-2012, 12:36 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
See the discussion here https://www.linuxquestions.org/quest...em-4175421247/ and the link therein http://www.linuxintro.org/wiki/Block...nd_block_sizes
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
List difference between disk druid and fdisk sanjubaba Linux - General 7 09-15-2011 11:02 AM
LXer: Ubuntu Netbook vs. Ubuntu Mobile Internet Devices: What's the Difference? LXer Syndicated Linux News 0 07-23-2008 09:30 PM
Trouble with Ubuntu, fdisk & grub roro1993 Linux - Newbie 8 02-29-2008 01:53 PM
`fdisk -l` ---for the difference Etxended hunter_cao7 Linux - Server 5 11-28-2007 05:07 AM
weird fdisk problem (Fdisk unable to see winxp partitions) khidot Slackware - Installation 5 04-07-2007 10:26 PM


All times are GMT -5. The time now is 02:29 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration