CLI tools commands used by GParted and KDE Partition Manager under the hood

CLI tools commands used by GParted and KDE Partition Manager under the hood

GParted and KDE Partition Manager use libparted for some tasks, but they use other command-line tools under the hood.

I want to reproduce a complex set of operations done with GParted or KDE Partition Manager by manually executing individual commands from the terminal. These operations involve resizing and moving partitions.

The problem is that the GParted log and the KDE Partition Manager log are not detailed enough, as they do not provide a detailed list of the commands used. They mainly indicate "what" operations were performed but not "how."

Is it possible to know how every task is performed by GParted or KDE Partition Manager so I can manually re-execute the same tasks from the terminal?

I'm not asking for a tutorial for fdisk, cfdisk, sfdisk, parted or similar. I'm asking if it is possible to automatically have the list of commands executed by GParted or KDE Partition Manager (assuming all their operations are performed invoking CLI tools under the hood).

答案1

GParted -> CLI parted -> library libparted

What is parted, libparted, gparted, GNU Parted...?

'GNU Parted' is a GNU package consisting of a library ('libparted') and a textmode frontend ('parted') which also serves as sample implementation. 'GParted' is a Gnome partition editor that uses libparted.

But GParted uses more than just parted

packages dependencies:

Documentation

For inspecting what CLI commands are used you may try strace or atrace or ltrace. See:

For inspecting file access inotify see this post

Finally you may use Ghidra wiki to inspect / trace / audit CLI calls and get an idea about an application flow.

答案2

More documentation can be found in the application help manual, and online at: running Gparted from the command line

相关内容