4

Querying partitionmananger --help does not document any verbose mode. Even gparted --help is not implemented. I wish I could use any --verbose mode without more esoteric thingy like using ltrace, because unless checking their sources one can not know if they resort only on libparted or some operations are performed using system commands, hence not being traced.

I don't know nesting strace on ltrace or vice-versa... I guess that would be a lot of standard output?

How to learn what gparted, partitionmanager... libcalls or fdisk, parted... commands are wrapping? I want to learn to use parted and fdisk in order not to need to rely on GUI interfaces such as gparted or partitionmanager, as I currently more or less know how to use the lvm suite of operations but not the more arcane fdisk and parted, but I guess it should help a lot watching actual examples of parted, fdisk and libparted being invoked by the user use of, for instance, gparted.

1 Answer 1

3

If I understand your question correctly (and I might not), then I think that you wish to determine which libraries are being used by a particular application. In this case ldd is your friend.

ldd /path/to/binary

gparted is actually a script (well it is on my Debian Wheezy box), and to determine the executables which are being called, simply cat /usr/sbin/gparted and read the script. When you find the exectuable files you are interested in, you can run ldd to determine which libraries are being linked to.

If you want a more verbose answer for a particular application, you can always download the source code if the software is open source, and have a look there. Usually you will find a file called INSTALL ( you can get from package developer's website or in most GNU/Linux distributions you may find it also in /usr/share/doc/) which tell you which libraries the software depends on before you can compile it.

2
  • I actually know gparted requires and uses libparted, ldd is not completely necessary for knowing this because it is stated by the description of the gparted package and because the package depends on libparted (libparted0debian1 actually for Debian 7 wheezy). I edited the question to state more precisely I want to see actual calls to the functions of the library, not just know which library it depends on. I just thought I'ld break less partitions if I use the parted documentation not only by itself but together actual libparted examples coming from a gparted verbose mode.
    – 174140
    Commented Feb 5, 2015 at 11:26
  • I think that the only solution to this would be to examine the source code of the package. However, I found this, which might be useful? libparted_handbook.pdf
    – glapworth
    Commented Feb 5, 2015 at 11:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .