Understanding sfdisk and df results


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Understanding sfdisk and df results
# 1  
Old 03-23-2009
Understanding sfdisk and df results

Hi,

Using fdisk I created a partition of 15.7 GB. I entered +15700M

Using sfdisk there is a heading called blocks and there is a number which is approximatly 400 BM less. When I mount the partition and use df -l the 1K block column displays only 15GB!

I need to understand these numbers if I am going to create a partition of an appropriate size. Can anyone tell me the mathematics behind these numbers please!
# 2  
Old 04-09-2009
Preliminarily I am thinking it has to do with "rounding off" of file sizes according to different schemes:

take a look at the fstab man page as it has options for

fstab -b = sectorsize of disk

fstab -C = cyls

fstab -H = heads

fstab -S = sectors per track of the disk (used for partition tables)

I think this is what you are asking.............?
# 3  
Old 04-09-2009
the man page for df states that using the -l option gives results of the local filesystem only.

not sure what that means exactly right at the moment, but also you can use df -h

for "human readable" either in kb, MB, or GB

hope this helps.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I want to add a variable for the results from the formula of one variable and results of another var

Good morning all, This is the file name in question OD_Orders_2019-02-19.csv I am trying to create a bash script to read into files with yesterdays date on the file name while retaining the rest of the files name. I would like for $y to equal, the name of the file with a formula output with... (2 Replies)
Discussion started by: Ibrahim A
2 Replies

2. Shell Programming and Scripting

Need your help in understanding this

Hi, I found this in a script and I would like to know how this works Code is here: # var1=PART1_PART2 # var2=${var1##*_} # echo $var2 PART2 I'm wondering how ##* makes the Shell to understand to pick up the last value from the given. (2 Replies)
Discussion started by: sathyaonnuix
2 Replies

3. Red Hat

Understanding Results from df and du commands

Good day every one. When a use df -h comand on my read hat linux server i get something like this: /dev/mapper/Vg02-Lv19 30G 29G 145M 100% /app Then when i do du -sh /app/ i get 12G /app/ For me it is meaning that only 12G was used on /app partition. How can i see where are... (9 Replies)
Discussion started by: cgege
9 Replies

4. Shell Programming and Scripting

Can ctag and cscope support recording search results and displaying the history results ?

Hello , When using vim, can ctag and cscope support recording search results and displaying the history results ? Once I jump to one tag, I can use :tnext to jump to next tag, but how can I display the preview search result? (0 Replies)
Discussion started by: 915086731
0 Replies

5. UNIX for Dummies Questions & Answers

understanding {%/*}/

Hi Gurus: I am trying to understand the following line of code.I did enough of googling to understand but no luck.Please help me understand the follow chunk of code: X=$0 MOD=${X%/*}/env.ksh X is the current script from which I am trying to execute. Say if X=test.ksh $MOD is echoing :... (3 Replies)
Discussion started by: vemana
3 Replies

6. Shell Programming and Scripting

need help understanding mv

I just started shell coding and I'm a bit confused on how 'mv' works can someone explain to me how it works and if i did this correctly. Thanks. echo "Enter Name of the first file:" read file1 #echo $file1 if ; then echo "Sorry, file does not exist." exit 1 ... (16 Replies)
Discussion started by: taiL
16 Replies

7. Filesystems, Disks and Memory

Udev label removes corresponding fdisk, sfdisk or lsvdev entry

I'm curious about the behavior where any udev labeled device causes that corresponding listing to disappear from fdisk, sfdisk, or in the case of RDAC, lsvdev. I have seen this on both EMC clariion and Sun Storagetek/Engenio 6540 arrays. We use RHEL5.1 and udev to create persistent labels for... (2 Replies)
Discussion started by: Radar
2 Replies

8. Shell Programming and Scripting

Understanding cut

In our old code, we have the below statements LAST_FRIDAY=2009-01-16 echo $LAST_FRIDAY|cut -d '"' -f2 And the output of this is 2009-01-16 The delimiter provided in cut statement is not used in the variable. Also, when we give f1 or f3 or f10 or any other field instead of f2, we still... (3 Replies)
Discussion started by: krishmaths
3 Replies

9. Shell Programming and Scripting

sfdisk for automated partitioning?

Hi guys, I want to write a script to automate partitioning for some project that I'm working on. I tried using fdisk but it was too painful... so, turned to sfdisk but now I'm getting strange results...or at least I think so. What I want to do is, to get the disk size to be created from... (0 Replies)
Discussion started by: alirezan
0 Replies
Login or Register to Ask a Question