Sponsored Content
Special Forums Hardware Filesystems, Disks and Memory "parted" command not working in Fedora9 Post 302809149 by ravisingh on Saturday 18th of May 2013 11:37:15 AM
Old 05-18-2013
"parted" command not working in Fedora9

I ran the foll. command:
Code:
parted /dev/sdb
(parted) p
mkpart primary 1GB 1.5GB

The parted command (when I print the details) outputs something like below:
1 2048MB .......

what I want to bring in your notice that only 1 row came showing the complete size of the disk (detachable device) although I created 2 partitions with fdisk command.

The output of the below differs from above
Code:
fdisk /dev/sdb
(....): p

It outputs 2 rows as I created 2 partitions. Why then parted command doesn't show it and shows the total size of the disk.

My other question :
When I put a fresh pendrive (without partitioning) it shows as one. (I mean it doesn't show that there are any partitions as I havent created any which is fine). Now when I create a partition say /dev/sdb1 (of /dev/sdb) then the output of fdisk shows sdb1. What about the remaining space. Now after creating a partition (sdb1), why then only sdb1 can be mounted and not the other part. Because earlier when there was no partition , it had mounted the complete disk.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Listing only directories in the current working directory using the "ls" command

Hello All, I am trying to list only directories in my current directory using the command "ls -d". But the output only contains the default directory "." and doesn't list the rest of the directories in the working directory. Can anyone explain why this is happening (2 Replies)
Discussion started by: igandu
2 Replies

2. UNIX for Advanced & Expert Users

Running command "md5" on remote host not working.

My question is very strange. I can run ls command on remote host using ssh successfully. but when i try to run /sbin/md5 command on remote host. it doesnt run and get back to me on command prompt. md5 command is exist on remote host. This is what i tried which ran successfully. Query -... (1 Reply)
Discussion started by: ynilesh
1 Replies

3. Shell Programming and Scripting

sub option of awk command not working with "\" character.

Hi all, I would like to replace some string in a text file by some string which would contains special characters like "/","\". I.e. I have a text file with the statement contactperson somewhere in it. Now I want to replace it by something else which includes special characters like "/","\" ... (1 Reply)
Discussion started by: shareef
1 Replies

4. Solaris

"smbclient" command not working

I've installed Samba on my Solaris 10 (SPARC) server # pkginfo |grep samba system SUNWsmbac samba - A Windows SMB/CIFS fileserver for UNIX (client) system SUNWsmbar samba - A Windows SMB/CIFS fileserver for UNIX (Root) system ... (1 Reply)
Discussion started by: soliberus
1 Replies

5. Shell Programming and Scripting

"sed" command is not working in shell script

Hi All, I am not much strong in shell scripting... I am using sed command in my script to find and replace a string....... This is how script looks : ############# #!/usr/bin/ksh CONFIG_FILE=iom_test.txt FIND=`echo "NIS_FTP_SERVER1=123.456.iom.com"` REPLACE=`echo... (2 Replies)
Discussion started by: askumarece
2 Replies

6. UNIX for Advanced & Expert Users

command for recently modified files - "find" command not working

I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Discussion started by: joe.mani
1 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

9. Shell Programming and Scripting

Using sed command to replace "|" with ^ for all *.dat files in a folder not working

I am trying to use the below sed command to replace all "|" to ^, in a folder had 50 dat files. when i tried with 1 file it worked but when i tried with wild card, is not working. sed -i 's/"|"/\^/g' *.dat Is this the proper way to use sed command thank you very much for help. (3 Replies)
Discussion started by: cplusplus1
3 Replies
PARTX(8)						       System Administration							  PARTX(8)

NAME
       partx - tell the kernel about the presence and numbering of on-disk partitions

SYNOPSIS
       partx [-a|-d|-P|-r|-s|-u] [-t type] [-n M:N] [-] disk
       partx [-a|-d|-P|-r|-s|-u] [-t type] partition [disk]

DESCRIPTION
       Given a device or disk-image, partx tries to parse the partition table and list its contents.  It can also tell the kernel to add or remove
       partitions from its bookkeeping.

       The disk argument is optional when a partition argument is provided.  To force scanning a partition as if it were a whole disk (for example
       to list nested subpartitions), use the argument "-" (hyphen-minus).  For example:

	      partx --show - /dev/sda3

       This will see sda3 as a whole-disk rather than as a partition.

       partx  is  not  an fdisk program - adding and removing partitions does not change the disk, it just tells the kernel about the presence and
       numbering of on-disk partitions.

OPTIONS
       -a, --add
	      Add the specified partitions, or read the disk and add all partitions.

       -b, --bytes
	      Print the SIZE column in bytes rather than in human-readable format.

       -d, --delete
	      Delete the specified partitions or all partitions.

       -g, --noheadings
	      Do not print a header line with --show or --raw.

       -l, --list
	      List the partitions.  Note that all numbers are in 512-byte sectors.  This output format is DEPRECATED in favour of --show.  Do  not
	      use it in newly written scripts.

       -n, --nr M:N
	      Specify  the range of partitions.  For backward compatibility also the format M-N is supported.  The range may contain negative num-
	      bers, for example --nr -1:-1 means the last partition, and --nr -2:-1 means the last two partitions.  Supported range specifications
	      are:

		     M	    Specifies just one partition (e.g. --nr 3).

		     M:     Specifies the lower limit only (e.g. --nr 2:).

		     :N     Specifies the upper limit only (e.g. --nr :4).

		     M:N    Specifies the lower and upper limits (e.g. --nr 2:4).

       -o, --output list
	      Define the output columns to use for --show, --pairs and --raw output.  If no output arrangement is specified, then a default set is
	      used.  Use --help to get list of all supported columns.  This option cannot be combined with the --add, --delete, --update or --list
	      options.

       -P, --pairs
	      List the partitions using the KEY="value" format.

       -r, --raw
	      List the partitions using the raw output format.

       -s, --show
	      List  the partitions.  The output columns can be selected and rearranged with the --output option.  All numbers (except SIZE) are in
	      512-byte sectors.

       -t, --type type
	      Specify the partition table type.

       --list-types
	      List supported partition types and exit.

       -u, --update
	      Update the specified partitions.

       -S, --sector-size size
	      Overwrite default sector size.

       -v, --verbose
	      Verbose mode.

       -V, --version
	      Display version information and exit.

       -h, --help
	      Display help text and exit.

EXAMPLES
       partx --show /dev/sdb3
       partx --show --nr 3 /dev/sdb
       partx --show /dev/sdb3 /dev/sdb
	      All three commands list partition 3 of /dev/sdb.

       partx --show - /dev/sdb3
	      Lists all subpartitions on /dev/sdb3 (the device is used as whole-disk).

       partx -o START -g --nr 5 /dev/sdb
	      Prints the start sector of partition 5 on /dev/sdb without header.

       partx -o SECTORS,SIZE /dev/sda5 /dev/sda
	      Lists the length in sectors and human-readable size of partition 5 on /dev/sda.

       partx --add --nr 3:5 /dev/sdd
	      Adds all available partitions from 3 to 5 (inclusive) on /dev/sdd.

       partx -d --nr :-1 /dev/sdd
	      Removes the last partition on /dev/sdd.

SEE ALSO
       addpart(8), delpart(8), fdisk(8), parted(8), partprobe(8)

AUTHORS
       Davidlohr Bueso <dave@gnu.org>
       Karel Zak <kzak@redhat.com>

       The original version was written by Andries E. Brouwer <aeb@cwi.nl>.

ENVIRONMENT
       LIBBLKID_DEBUG=all
	      enables libblkid debug output.

AVAILABILITY
       The partx command is part of the util-linux package and is available  from  Linux  Kernel  Archive  <https://www.kernel.org/pub/linux/utils
       /util-linux/>.

util-linux							   December 2014							  PARTX(8)
All times are GMT -4. The time now is 08:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy