Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory Understanding sfdisk and df results Post 302300290 by mojoman on Monday 23rd of March 2009 06:56:00 PM
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!
 

9 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

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

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

7. 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

8. 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

9. 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
CFDISK(8)						       System Administration							 CFDISK(8)

NAME
cfdisk - display or manipulate a disk partition table SYNOPSIS
cfdisk [options] [device] DESCRIPTION
cfdisk is a curses-based program for partitioning any block device. The default device is /dev/sda. Note that cfdisk provides basic partitioning functionality with a user-friendly interface. If you need advanced features, use fdisk(8) instead. Since version 2.25 cfdisk supports MBR (DOS), GPT, SUN and SGI disk labels, but no longer provides any functionality for CHS (Cylinder- Head-Sector) addressing. CHS has never been important for Linux, and this addressing concept does not make any sense for new devices. Since version 2.25 cfdisk also does not provide a 'print' command any more. This functionality is provided by the utilities partx(8) and lsblk(8) in a very comfortable and rich way. If you want to remove an old partition table from a device, use wipefs(8). OPTIONS
-h, --help Display help text and exit. -L, --color[=when] Colorize the output. The optional argument when can be auto, never or always. If the when argument is omitted, it defaults to auto. The colors can be disabled, for the current built-in default see --help output. See also the COLORS section. -V, --version Display version information and exit. -z, --zero Start with an in-memory zeroed partition table. This option does not zero the partition table on the disk; rather, it simply starts the program without reading the existing partition table. This option allows you to create a new partition table from scratch or from an sfdisk-compatible script. COMMANDS
The commands for cfdisk can be entered by pressing the corresponding key (pressing Enter after the command is not necessary). Here is a list of the available commands: b Toggle the bootable flag of the current partition. This allows you to select which primary partition is bootable on the drive. This command may not be available for all partition label types. d Delete the current partition. This will convert the current partition into free space and merge it with any free space immediately surrounding the current partition. A partition already marked as free space or marked as unusable cannot be deleted. h Show the help screen. n Create a new partition from free space. cfdisk then prompts you for the size of the partition you want to create. The default size is equal to the entire available free space at the current position. The size may be followed by a multiplicative suffix: KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g. "K" has the same meaning as "KiB"). q Quit the program. This will exit the program without writing any data to the disk. s Sort the partitions in ascending start-sector order. When deleting and adding partitions, it is likely that the numbering of the partitions will no longer match their order on the disk. This command restores that match. t Change the partition type. By default, new partitions are created as Linux partitions. u Dump the current in-memory partition table to an sfdisk-compatible script file. The script files are compatible between cfdisk, fdisk, sfdisk and other libfdisk applications. For more details see sfdisk(8). It is also possible to load an sfdisk-script into cfdisk if there is no partition table on the device or when you start cfdisk with the --zero command-line option. W Write the partition table to disk (you must enter an uppercase W). Since this might destroy data on the disk, you must either con- firm or deny the write by entering `yes' or `no'. If you enter `yes', cfdisk will write the partition table to disk and then tell the kernel to re-read the partition table from the disk. The re-reading of the partition table does not always work. In such a case you need to inform the kernel about any new partitions by using partprobe(8) or partx(8), or by rebooting the system. x Toggle extra information about a partition. Up Arrow, Down Arrow Move the cursor to the previous or next partition. If there are more partitions than can be displayed on a screen, you can display the next (previous) set of partitions by moving down (up) at the last (first) partition displayed on the screen. Left Arrow, Right Arrow Select the preceding or the next menu item. Hitting Enter will execute the currently selected item. All commands can be entered with either uppercase or lowercase letters (except for Write). When in a submenu or at a prompt, you can hit the Esc key to return to the main menu. COLORS
Implicit coloring can be disabled by creating the empty file /etc/terminal-colors.d/cfdisk.disable. See terminal-colors.d(5) for more details about colorization configuration. cfdisk does not support color customization with a color-scheme file. ENVIRONMENT
CFDISK_DEBUG=all enables cfdisk debug output. LIBFDISK_DEBUG=all enables libfdisk debug output. LIBBLKID_DEBUG=all enables libblkid debug output. LIBSMARTCOLS_DEBUG=all enables libsmartcols debug output. LIBSMARTCOLS_DEBUG_PADDING=on use visible padding characters. Requires enabled LIBSMARTCOLS_DEBUG. SEE ALSO
fdisk(8), parted(8), partprobe(8), partx(8), sfdisk(8) AUTHOR
Karel Zak <kzak@redhat.com> The current cfdisk implementation is based on the original cfdisk from Kevin E. Martin (martin@cs.unc.edu). AVAILABILITY
The cfdisk command is part of the util-linux package and is available from https://www.kernel.org/pub/linux/utils/util-linux/. util-linux March 2014 CFDISK(8)
All times are GMT -4. The time now is 04:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy