diff --git a/sources/tech/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md b/sources/tech/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md deleted file mode 100644 index 8082df5bf6..0000000000 --- a/sources/tech/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md +++ /dev/null @@ -1,117 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (geekpi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (Check Your Disk Usage Using ‘duf’ Terminal Tool [Friendly Alternative to du and df commands]) -[#]: via: (https://itsfoss.com/duf-disk-usage/) -[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) - -Check Your Disk Usage Using ‘duf’ Terminal Tool [Friendly Alternative to du and df commands] -====== - -_**Brief: duf is a terminal tool meant as an enhancement to the traditional “df” and “du” Linux commands. It lets you easily check for free disk space, sort the output, and present it in a user-friendly manner.**_ - -### duf: A Cross-Platform disk usage utility written in Golang - -![][1] - -Before I knew about this utility, I preferred using a GUI program like [Stacer][2] or the pre-installed GNOME Disk usage app to [check free disk space][3] and the disk usage numbers for my system. - -However, [duf][4] seems to be a useful terminal tool to check disk usage and free space that is written in [Golang][5]. Even though Abhishek suggested me to give this a try, I found it more interesting, especially considering that I’m currently learning Golang, what a coincidence! - -It is fairly easy to use no matter whether you are a terminal guru or just a beginner not comfortable with the terminal. It is certainly easier to understand than the [df command for checking disk space utilization][6]. - -Let me highlight some of the key features and its usage before you get it installed on your system. - -### Features of duf - -![][7] - - * Gives you an overview of all the devices mounted which is easy to understand - * Ability to specify a directory/file name and check free space for that mount point - * Change/Remove columns from the output - * List [inode][8] information - * Sort the output - * JSON output supported - * Ability to specify the theme if it does not detect your terminal’s theme automatically - - - -### Installing & Using duf on Linux - -You can find a package for Arch Linux in [AUR][9]. There’s also a package available if you’re using the [Nix package manager][10]. - -For Debian-based distros and RPM packages, you can go to its [GitHub releases section][11] and grab the package suitable for your system. - -It’s also available for Windows, Android, macOS, and FreeBSD as well. - -In my case, I had to [install the DEB package][12], and it was good to go. Once you set it up, using it is quite simple, all you have to do is type in: - -``` -duf -``` - -This should give you the details for all the local devices, any cloud storage devices mounted, and any other special devices (that includes temporary storage locations and more). - -If you want to take a look at all the available commands using **duf** at a glance, you can type in: - -``` -duf --help -``` - -![][13] - -For instance, if you just want to see the details of the local devices connected and nothing else, all you have to type is: - -``` -duf --only local -``` - -Another example would be sorting the output based on the size in a particular order, here’s what you need to type: - -``` -duf --sort size -``` - -And, the output should look like: - -![][14] - -You can explore its [GitHub page][4] for more information on additional commands and installation instructions. - -[Download duf][4] - -### Closing Thoughts - -I find the terminal tool ‘duf’ quite handy to keep an eye on the free disk space or the usage stats without needing to use a GUI program. - -Is there anything similar to this tool that you know of? Feel free to let me know your thoughts in the comments down below. - --------------------------------------------------------------------------------- - -via: https://itsfoss.com/duf-disk-usage/ - -作者:[Ankush Das][a] -选题:[lujun9972][b] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://itsfoss.com/author/ankush/ -[b]: https://github.com/lujun9972 -[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/duf-screenshot.jpg?resize=800%2C481&ssl=1 -[2]: https://itsfoss.com/optimize-ubuntu-stacer/ -[3]: https://itsfoss.com/check-free-disk-space-linux/ -[4]: https://github.com/muesli/duf -[5]: https://golang.org/ -[6]: https://linuxhandbook.com/df-command/ -[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/duf-local.jpg?resize=800%2C195&ssl=1 -[8]: https://linuxhandbook.com/inode-linux/ -[9]: https://itsfoss.com/aur-arch-linux/ -[10]: https://github.com/NixOS/nixpkgs -[11]: https://github.com/muesli/duf/releases -[12]: https://itsfoss.com/install-deb-files-ubuntu/ -[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/duf-commands.jpg?resize=800%2C443&ssl=1 -[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/duf-sort-example.jpg?resize=800%2C365&ssl=1 diff --git a/translated/tech/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md b/translated/tech/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md new file mode 100644 index 0000000000..889d51fc1b --- /dev/null +++ b/translated/tech/20210224 Check Your Disk Usage Using ‘duf- Terminal Tool -Friendly Alternative to du and df commands.md @@ -0,0 +1,116 @@ +[#]: collector: (lujun9972) +[#]: translator: (geekpi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (Check Your Disk Usage Using ‘duf’ Terminal Tool [Friendly Alternative to du and df commands]) +[#]: via: (https://itsfoss.com/duf-disk-usage/) +[#]: author: (Ankush Das https://itsfoss.com/author/ankush/) + +使用 “duf” 终端工具检查你的磁盘使用情况(du 和 df 命令的友好替代品) +====== + +_**简介:duf 是一个终端工具,旨在增强传统的 Linux 命令 “df” 和 “du”。它可以让你轻松地检查可用磁盘空间,对输出进行分类,并以用户友好的方式呈现。**_ + +### duf:一个用 Golang 编写的跨平台磁盘使用情况工具 + +![][1] + +在我知道这个工具之前,我更喜欢使用像 [Stacer][2] 这样的 GUI 程序或者预装的 GNOME 磁盘使用情况程序来[检查可用的磁盘空间][3]和系统的磁盘使用数量。 + +不过,[duf][4] 似乎是一个有用的终端工具,可以检查磁盘使用情况和可用空间,它是用 [Golang][5] 编写的。尽管 Abhishek 建议我试一试它,但我觉得它还要有趣,尤其是考虑到我目前正在学习 Golang,真是太巧了! + +无论你是终端大师还是只是一个对终端不适应的初学者,它都相当容易使用。当然,它比[检查磁盘空间利用率命令 df][6] 更容易理解。 + +在你把它安装到你的系统上之前,让我重点介绍一下它的一些主要功能和用法。 + +### duf 的特点 + +![][7] + + * 提供所有挂载设备的概览且易于理解。 + * 能够指定目录/文件名并检查该挂载点的可用空间。 + * 更改/删除输出中的列 + * 列出 [inode][8] 信息 + * 输出排序 + * 支持 JSON 输出 + * 如果不能自动检测终端的主题,可以指定主题。 + + +### 在 Linux 上安装和使用 duf + +你可以在 [AUR][9] 中找到一个 Arch Linux 的软件包。如果你使用的是 [Nix 包管理器][10],也可以找到一个包。 + +对于基于 Debian 的发行版和 RPM 包,你可以去它的 [GitHub 发布区][11]中获取适合你系统的包。 + +它也适用于 Windows、Android、macOS 和 FreeBSD。 + +在我这里,我需要[安装 DEB 包][12],然后就可以使用了。安装好后,使用起来很简单,你只要输入: + +``` +duf +``` + +这应该会给你提供所有本地设备、已挂载的任何云存储设备以及任何其他特殊设备(包括临时存储位置等)的详细信息。 + +如果你想一目了然地查看所有 **duf** 的可用命令,你可以输入: + +``` +duf --help +``` + +![][13] + +例如,如果你只想查看本地连接设备的详细信息,而不是其他的,你只需要输入: + +``` +duf --only local +``` + +另一个例子是根据大小按特定顺序对输出进行排序,下面是你需要输入的内容: + +``` +duf --sort size +``` + +输出应该是像这样的: + +![][14] + +你可以探索它的 [GitHub 页面][4],以获得更多关于额外命令和安装说明的信息。 + +[下载 duf][4] + +### 结束语 + +我发现终端工具 “duf” 相当方便,可以在不需要使用 GUI 程序的情况下,随时查看可用磁盘空间或使用情况。 + +你知道有什么类似的工具吗?欢迎在下面的评论中告诉我你的想法。 + +-------------------------------------------------------------------------------- + +via: https://itsfoss.com/duf-disk-usage/ + +作者:[Ankush Das][a] +选题:[lujun9972][b] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://itsfoss.com/author/ankush/ +[b]: https://github.com/lujun9972 +[1]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/duf-screenshot.jpg?resize=800%2C481&ssl=1 +[2]: https://itsfoss.com/optimize-ubuntu-stacer/ +[3]: https://itsfoss.com/check-free-disk-space-linux/ +[4]: https://github.com/muesli/duf +[5]: https://golang.org/ +[6]: https://linuxhandbook.com/df-command/ +[7]: https://i2.wp.com/itsfoss.com/wp-content/uploads/2021/02/duf-local.jpg?resize=800%2C195&ssl=1 +[8]: https://linuxhandbook.com/inode-linux/ +[9]: https://itsfoss.com/aur-arch-linux/ +[10]: https://github.com/NixOS/nixpkgs +[11]: https://github.com/muesli/duf/releases +[12]: https://itsfoss.com/install-deb-files-ubuntu/ +[13]: https://i1.wp.com/itsfoss.com/wp-content/uploads/2021/02/duf-commands.jpg?resize=800%2C443&ssl=1 +[14]: https://i0.wp.com/itsfoss.com/wp-content/uploads/2021/02/duf-sort-example.jpg?resize=800%2C365&ssl=1