improve the readme

This commit is contained in:
Sylvestre Ledru
2024-01-28 22:52:41 +01:00
parent d986d06d5b
commit 7c7eae1374

169
README.md

@ -1,96 +1,107 @@
# util-linux # util-linux
This projects aims at doing the same as https://github.com/uutils/coreutils for util-linux. This projects aims at doing the same as https://github.com/uutils/coreutils for util-linux.
We are rewriting these tools in Rust as dropped-in replacements.
We are rewriting <a href="http://www.kernel.org/pub/linux/utils/util-linux/">these tools</a> in Rust as dropped-in replacements.
Currently, we have skeletons for: Currently, we have skeletons for:
* /usr/bin/lscpu: Displays information about the CPU architecture.
* /bin/mountpoint: Checks if a directory is a mountpoint. * /bin/mountpoint: Checks if a directory is a mountpoint.
First, reimplement the most important tools from util-linux First, reimplement the most important tools from util-linux
## System Information
- dmesg: Displays kernel messages.
- lscpu: Shows CPU architecture information.
Started
- lsipc: Lists IPC facilities.
- lslocks: Lists system locks.
- lsmem: Lists memory ranges and status.
- lsns: Lists namespaces.
* /bin/su: Switches to another user account. ## Hardware Management
* /sbin/blkid: Locates or prints block device attributes. - chcpu: Manages CPU state.
* /sbin/fsck: Checks and repairs a Linux file system. - rtcwake: Manages system sleep states.
* /sbin/mkfs: Builds a Linux file system on a device, usually used for formatting. - zramctl: Manages zram devices.
* /sbin/mkswap: Sets up a Linux swap area. - wdctl: Shows watchdog status.
* /usr/bin/getopt: Parses command options, essential for scripting. - chmem: Manages kernel memory usage.
* /usr/bin/lsblk: Lists information about all available or specified block devices.
* /bin/dmesg: Displays or controls the kernel ring buffer, used for viewing system message logs.
Second, the long list: ## Filesystem Tools
* /bin/findmnt: Lists all mounted filesystems or searches for a filesystem. - findmnt: Lists mounted filesystems.
* /bin/more: A file pager, displays text files one screen at a time. - mountpoint: Checks if a directory is a mountpoint.
* /sbin/agetty: Manages physical or virtual terminals and is essential for login prompts. Started
* /sbin/blkdiscard: Securely discards blocks on a device, useful for SSDs and thin-provisioned LUNs. - fsck: Checks and repairs filesystems.
* /sbin/blkzone: Reports or modifies zoned block device parameters. - fsfreeze: Freezes/unfreezes filesystems.
* /sbin/blockdev: Performs various block device operations like setting read-only, fetching the size, etc. - fstrim: Discards unused blocks on filesystems.
* /sbin/chcpu: Configures CPU devices in the Linux kernel. - wipefs: Wipes filesystem signatures.
* /sbin/ctrlaltdel: Sets the function of the Ctrl-Alt-Del combination on the console.
* /sbin/findfs: Finds a filesystem by label or UUID. ## Partition Management
* /sbin/fsfreeze: Halts access to a filesystem for a snapshot. - blkdiscard: Discards sectors on a device.
* /sbin/fstrim: Discards unused blocks on a mounted filesystem, useful for SSDs. - blkid: Identifies block device attributes.
* /sbin/isosize: Outputs the length of an iso9660 filesystem. - blkzone: Manages zoned block device parameters.
* /sbin/mkfs.bfs: Creates a BFS filesystem, used primarily in older Linux distributions. - blockdev: Performs block device operations.
* /sbin/mkfs.cramfs: Creates a compressed ROM file system (cramfs). - mkswap: Sets up swap space.
* /sbin/mkfs.minix: Creates a MINIX filesystem. - swaplabel: Manages swap space labels.
* /sbin/pivot_root: Changes the root file system, used in advanced boot or system recovery scenarios. - addpart: Adds a partition.
* /sbin/runuser: Runs a command with the privileges of a specified user account. - delpart: Deletes a partition.
* /sbin/sulogin: Provides a login prompt to a single user shell, especially in system rescue mode. - partx: Manages partition entries.
* /sbin/swaplabel: Provides label and UUID for swap area. - resizepart: Resizes a partition.
* /sbin/switch_root: Switches to another filesystem as the root of the mount tree.
* /sbin/wipefs: Wipes a signature from a device to make it unrecognizable. ## Process and Resource Management
* /sbin/zramctl: Sets up and controls zram devices, which are compressed block devices in RAM. - runuser: Runs a shell with different user/group IDs.
* /usr/bin/addpart: Adds a partition to the system. - sulogin: Provides single-user mode login.
* /usr/bin/choom: Adjusts the OOM-killer score of processes. - chrt: Manages real-time process attributes.
* /usr/bin/chrt: Manipulates the real-time attributes of a process. - ionice: Sets process I/O scheduling class/priority.
* /usr/bin/delpart: Deletes a partition from the system. - kill: Sends signals to processes.
* /usr/bin/fallocate: Manipulates file space, allowing you to efficiently manage file storage space. - renice: Alters process priority.
* /usr/bin/flock: Manages file locking which is crucial in scripting and avoiding race conditions. - prlimit: Sets/gets process resource limits.
* /usr/bin/hardlink: Creates a hard link to a file. - taskset: Sets/gets process CPU affinity.
* /usr/bin/ionice: Sets or gets the I/O scheduling class and priority for a program. - uclampset: Manages process utilization clamping.
* /usr/bin/ipcmk: Creates IPC (Inter-process communication) resources.
* /usr/bin/ipcrm: Removes IPC resources. ## User and Session Management
* /usr/bin/ipcs: Shows IPC resources status. - su: Changes user ID or becomes superuser.
* /usr/bin/last: Shows a listing of last logged in users. - agetty: Manages TTYs for login prompts.
* /usr/bin/lsipc: Shows information on IPC facilities. - ctrlaltdel: Configures Ctrl-Alt-Del action.
* /usr/bin/lslocks: Lists local system locks. - pivot_root: Changes the root filesystem.
* /usr/bin/lslogins: Displays information about known users in the system. - switch_root: Switches to a different root filesystem.
* /usr/bin/lsmem: Shows the status of available memory. - last: Lists last logged-in users.
* /usr/bin/lsns: Lists namespaces. - lslogins: Displays user information.
* /usr/bin/mcookie: Generates magic cookies for xauth. - mesg: Controls write access to terminal.
* /usr/bin/mesg: Controls the access to your terminal by others. - setsid: Runs a program in a new session.
* /usr/bin/namei: Follows a pathname until a terminal point is found. - setterm: Sets terminal attributes.
* /usr/bin/nsenter: Runs programs in the context of other namespaces. - getty: Manages virtual console login prompts.
* /usr/bin/partx: Tells the kernel about the presence and numbering of on-disk partitions.
* /usr/bin/prlimit: Sets or reports process resource limits. ## Networking and IPC
* /usr/bin/rename.ul: Renames files. - ipcmk: Creates IPC resources.
* /usr/bin/resizepart: Resizes a partition. - ipcrm: Removes IPC resources.
* /usr/bin/rev: Reverses lines of a file or files. - ipcs: Shows IPC facilities status.
* /usr/bin/setarch: Sets architecture emulation for a new process. - nsenter: Enters different namespaces.
* /usr/bin/setpriv: Runs a program with different Linux privilege settings.
* /usr/bin/setsid: Creates a new session and sets the process group ID. ## Utility Tools
* /usr/bin/setterm: Sets terminal attributes. - lsblk: Lists block devices.
* /usr/bin/taskset: Assigns a process to a specific CPU core. - more: Pager for file viewing.
* /usr/bin/uclampset: Sets or queries the utilization clamping value. - fallocate: Preallocates file space.
* /usr/bin/unshare: Runs a program with some namespaces unshared from the parent. - flock: Manages file locks.
* /usr/bin/utmpdump: Dumps the contents of utmp and wtmp files in a readable format. - getopt: Parses command options.
* /usr/bin/whereis: Locates the binary, source, and manual pages for a command. - hardlink: Creates hard links.
* /usr/sbin/chmem: Sets or reports the kernel memory policy. - mcookie: Generates random numbers.
* /usr/sbin/ldattach: Attaches a line discipline to a serial line. - namei: Follows a pathname to its endpoint.
* /usr/sbin/readprofile: Reads and displays kernel profiling information. - rename.ul: Renames files.
* /usr/sbin/rtcwake: Enters a system sleep state until specified wakeup time. - rev: Reverses lines in a file.
* /sbin/getty: Manages virtual consoles and serial terminals. - setarch: Sets architecture emulation.
* /usr/bin/i386: Sets the process execution domain to i386, for running 32-bit applications on 64-bit systems. - setpriv: Runs a program with different privileges.
* /usr/bin/lastb: Shows a listing of last failed login attempts. - unshare: Runs a program with unshared namespaces.
* /usr/bin/linux32: Runs a program in a 32-bit environment on a 64-bit kernel. - utmpdump: Dumps UTMP/WTMP files.
* /usr/bin/linux64: Runs a program in a 64-bit environment on a 64-bit kernel. - whereis: Locates binaries, sources, and manuals.
* /usr/bin/x86_64: Sets the process execution domain to x86_64, for running 64-bit applications. - ldattach: Attaches line discipline to a serial line.
- readprofile: Reads kernel profiling info.
- i386, linux32, linux64, x86_64: Set personality flags for execution environment.
Note: Note:
* /bin/more is already implemented in https://github.com/uutils/coreutils * /bin/more is already implemented in https://github.com/uutils/coreutils
Project: Project:
http://www.kernel.org/pub/linux/utils/util-linux/ http://www.kernel.org/pub/linux/utils/util-linux/