← 返回命令列表

Linux command

btrfs-filesystem 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Example

btrfs filesystem usage path/to/mount

Example

sudo btrfs filesystem show path/to/mount

Defragment

sudo btrfs filesystem defragment -v path/to/file

Defragment

sudo btrfs filesystem defragment -v -r path/to/dir

Sync

sudo btrfs filesystem sync path/to/mount

Example

sudo btrfs filesystem du -s path/to/dir

Example

sudo btrfs filesystem mkswapfile --size 8g path/to/swapfile

说明

btrfs filesystem manages btrfs filesystem properties and operations including usage statistics, defragmentation, synchronization, and device information display.

参数

usage
Show detailed filesystem space usage
show
Display filesystem information and device usage
df
Show disk space usage similar to df command
defragment
Defragment files or directories
sync
Force sync unwritten data to disk
du
Calculate disk usage for files and directories
mkswapfile
Create a swap file properly formatted for btrfs
-v, --verbose
Enable verbose output
-r
Recursive operation for defragment and du
-s, --summarize
Show only summary for du command

FAQ

What is the btrfs-filesystem command used for?

btrfs filesystem manages btrfs filesystem properties and operations including usage statistics, defragmentation, synchronization, and device information display.

How do I run a basic btrfs-filesystem example?

Run `btrfs filesystem usage path/to/mount` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does usage do in btrfs-filesystem?

Show detailed filesystem space usage