显示标签为“arch”的博文。显示所有博文
显示标签为“arch”的博文。显示所有博文

2020-07-25

arch-base

1. Install essential packages 安装基本软件包
2. 基础包 base Dependencies (27); 开发基础包 groups:base-devel (24)
3. 其他软件包 packages.x86_64 (90)
4. 更多软件包

1. Install essential packages 安装基本软件包

https://wiki.archlinux.org/index.php/Installation_guide#Install_essential_packages
使用pacstrap(8)脚本安装通用硬件的base软件包,Linux内核和固件:
# pacstrap /mnt base linux linux-firmware
base软件包不包括实时安装中的所有工具,因此对于功能完整的基本系统,可能需要安装其他软件包。特别要考虑安装:
  •  用户空间实用程序,用于管理将在系统上使用的文件系统,
  •  用于访问RAID或LVM分区的实用程序,
  •  linux固件中未包含的其他设备的特定固件,
  •  联网所需的软件,
  •  文字编辑器
  •  用于访问手册页和信息页中的文档的软件包:man-db,man-pages和texinfo。
要安装其他软件包或软件包组,请将名称附加到上面的pacstrap命令(以空格分隔)或在chroot到新系统中时使用pacman。为了进行比较,可以在packages.x86_64中找到实时系统中可用的软件包。https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/packages.x86_64

2. 基础包 base Dependencies (27); 开发基础包 groups:base-devel (24)

https://www.archlinux.org/packages/core/any/base/
https://www.archlinux.org/groups/x86_64/base-devel/
namehttps://www.archlinux.org/packages/core/any/base/ https://www.archlinux.org/groups/x86_64/base-develingroup
bashThe GNU Bourne Again shellGNU Bourne Again外壳Qebase
bzip2A high-quality data compression program高质量的数据压缩程序Qebase
coreutilsThe basic file, shell and text manipulation utilities of the GNU operating systemGNU操作系统的基本文件,shell和文本操作实用程序Qebase
filesystemBase Arch Linux files基本Arch Linux文件Qebase
gcc-libsRuntime libraries shipped by GCCGCC随附的运行时库Qebase
glibcGNU C LibraryGNU C库Qebase
iproute2IP Routing UtilitiesIP路由实用程序Qebase
iputilsNetwork monitoring tools, including ping网络监控工具,包括pingQebase
licensesStandard licenses distribution package标准许可证分发包Qebase
linuxThe Linux kernel and modulesLinux内核和模块Qebase
pciutilsPCI bus configuration space access library and toolsPCI总线配置空间访问库和工具Qebase
procps-ngUtilities for monitoring your system and its processes监视系统及其过程的实用程序Qebase
psmiscMiscellaneous procfs tools杂项生产工具Qebase
shadowPassword and account management tool suite with support for shadow files and PAM密码和帐户管理工具套件,支持影子文件和PAMQebase
systemdsystem and service manager系统和服务经理dbase
systemd-sysvcompatsysvinit compat for systemdsysvinit compat for systemdQebase
tarUtility used to store, backup, and transport files用于存储,备份和传输文件的实用程序Qebase
util-linuxMiscellaneous system utilities for Linux适用于Linux的其他系统实用程序Qebase
xzLibrary and command line tools for XZ and LZMA compressed files用于XZ和LZMA压缩文件的库和命令行工具dbase
fileFile type identification utility文件类型识别实用程序Qebase,(base-devel)
findutilsGNU utilities to locate filesGNU实用程序来查找文件Qebase,(base-devel)
gawkGNU version of awkGNU版本的AWKQebase,(base-devel)
gettextGNU internationalization libraryGNU国际化库Qebase,(base-devel)
grepA string search utility字符串搜索实用程序Qebase,(base-devel)
gzipGNU compression utilityGNU压缩实用程序Qebase,(base-devel)
pacmanA library-based package manager with dependency support基于库的程序包管理器,具有依赖性支持Qebase,(base-devel)
sedGNU stream editorGNU流编辑器Qebase,(base-devel)
autoconfA GNU tool for automatically configuring source code一个用于自动配置源代码的GNU工具Qe(base-devel)
automakeA GNU tool for automatically creating Makefiles自动创建Makefile的GNU工具Qe(base-devel)
binutilsA set of programs to assemble and manipulate binary and object files一组程序,用于汇编和处理二进制文件和目标文件Qe(base-devel)
bisonThe GNU general-purpose parser generatorGNU通用解析器生成器Qe(base-devel)
fakerootTool for simulating superuser privileges模拟超级用户权限的工具Qe(base-devel)
flexA tool for generating text-scanning programs生成文本扫描程序的工具Qe(base-devel)
gccThe GNU Compiler Collection - C and C++ frontendsGNU编译器集合-C和C ++前端Qe(base-devel)
groffGNU troff text-formatting systemGNU troff文本格式系统d(base-devel)
libtoolA generic library support script通用库支持脚本d(base-devel)
m4The GNU macro processorGNU宏处理器Qe(base-devel)
makeGNU make utility to maintain groups of programsGNU使实用程序维护程序组Qe(base-devel)
patchA utility to apply patch files to original sources将补丁文件应用于原始来源的实用程序Qe(base-devel)
pkgconfPackage compiler and linker metadata toolkit包编译器和链接器元数据工具包Qe(base-devel)
sudoGive certain users the ability to run some commands as root使某些用户能够以root用户身份运行某些命令Qe(base-devel)
texinfoGNU documentation system for on-line information and printed outputGNU文档系统,用于在线信息和打印输出Qe(base-devel)
whichA utility to show the full path of commands显示命令完整路径的实用程序Qe(base-devel)

3. 其他软件包 packages.x86_64 (90)

https://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/packages.x86_64
namehttps://gitlab.archlinux.org/archlinux/archiso/-/blob/master/configs/releng/packages.x86_64insrepo
sudoGive certain users the ability to run some commands as root使某些用户能够以root用户身份运行某些命令(base-devel)Qecore
linuxThe Linux kernel and modulesLinux内核和模块Qecore
linux-firmwareFirmware files for LinuxLinux的固件文件Qecore
mkinitcpioModular initramfs image creation utility模块化initramfs映像创建实用程序dcore
intel-ucodeMicrocode update files for Intel CPUs英特尔CPU的微码更新文件Qeextra
diffutilsUtility programs used for creating patch files用于创建补丁文件的实用程序Qecore
dosfstoolsDOS filesystem utilitiesDOS文件系统实用程序dcore
ntfs-3gNTFS filesystem driver and utilitiesNTFS文件系统驱动程序和实用程序Qeextra
exfat-utilsUtilities for exFAT file systemexFAT文件系统实用程序Qecommunity
partedA program for creating, destroying, resizing, checking and copying partitions用于创建,销毁,调整大小,检查和复制分区的程序dextra
smartmontoolsControl and monitor S.M.A.R.T. enabled ATA and SCSI Hard Drives控制和监视S.M.A.R.T.启用的ATA和SCSI硬盘驱动器Qeextra
man-dbA utility for reading man pages用于阅读手册页的实用程序Qecore
man-pagesLinux man pagesLinux手册页Qecore
nanoPico editor clone with enhancements具有增强功能的Pico编辑器克隆Qecore
usbutilsUSB Device UtilitiesUSB设备实用程序Qecore
dhcpcdRFC2131 compliant DHCP client daemon符合RFC2131的DHCP客户端守护程序Qecore
wpa_supplicantA utility providing key negotiation for WPA wireless networks一种为WPA无线网络提供密钥协商的实用程序Qecore
ethtoolUtility for controlling network drivers and hardware用于控制网络驱动程序和硬件的实用程序Qeextra
gpmA mouse server for the console and xterm控制台和xterm的鼠标服务器dcore
btrfs-progsBtrfs filesystem utilitiesBtrfs文件系统实用程序dcore
xfsprogsXFS filesystem utilitiesXFS文件系统实用程序Qecore
dmraidDevice mapper RAID interface设备映射器RAID接口dcore
lvm2Logical Volume Manager 2 utilities逻辑卷管理器2实用程序Qecore
mdadmA tool for managing/monitoring Linux md device arrays, also known as Software RAID用于管理/监视Linux md设备阵列的工具, 也称为软件RAIDQecore
gptfdiskA text-mode partitioning tool that works on GUID Partition Table (GPT) disks在GUID分区表(GPT)磁盘上工作的文本模式分区工具dextra
nmapUtility for network discovery and security auditing网络发现和安全审核的实用程序rextra
tcpdumpPowerful command-line packet analyzer强大的命令行数据包分析器rextra
gnu-netcatGNU rewrite of netcat, the network piping application网络管道应用程序netcat的GNU重写rextra
reiserfsprogsReiserfs utilitiesReiserfs实用程序rcore
amd-ucodeMicrocode update files for AMD CPUsAMD CPU的微码更新文件
core
b43-fwcutterfirmware extractor for the b43 kernel moduleb43内核模块的固件提取器
core
crdaCentral Regulatory Domain Agent for wireless networks无线网络的中央监管域代理
core
efibootmgrLinux user-space application to modify the EFI Boot ManagerLinux用户空间应用程序以修改EFI Boot Manager
core
hdparmA shell utility for manipulating Linux IDE drive/driver parameters一个shell实用程序, 用于操纵Linux IDE驱动器/驱动程序参数
core
ipw2100-fwIntel Centrino Drivers firmware for IPW2100IPW2100的Intel Centrino驱动程序固件
core
ipw2200-fwFirmware for the Intel PRO/Wireless 2200BG英特尔PRO /无线2200BG的固件
core
jfsutilsJFS filesystem utilitiesJFS文件系统实用程序
core
mkinitcpio-nfs-utilsipconfig and nfsmount tools for NFS root support in mkinitcpioipconfig和nfsmount工具用于mkinitcpio中的NFS根支持
core
nfs-utilsSupport programs for Network File Systems网络文件系统的支持程序
core
nilfs-utilsA log-structured file system supporting continuous snapshotting (userspace utils)支持连续快照的日志结构文件系统(用户空间工具)
core
opensshPremier connectivity tool for remote login with the SSH protocol使用SSH协议进行远程登录的高级连接工具
core
pppA daemon which implements the Point-to-Point Protocol for dial-up networking一个实现用于拨号网络的点对点协议的守护程序
core
pptpclientClient for the proprietary Microsoft Point-to-Point Tunneling Protocol, PPTP.专有Microsoft点对点隧道协议PPTP的客户端.
core
sdparmAn utility similar to hdparm but for SCSI devices该实用程序类似于hdparm, 但用于SCSI设备
core
systemd-resolvconfsystemd resolvconf replacement (for use with systemd-resolved)systemd resolvconf替换(与systemd-resolved一起使用)
core
wireless_toolsTools allowing to manipulate the Wireless Extensions允许操作无线扩展的工具
core
wireless-regdbCentral Regulatory Domain Database中央监管域数据库
core
arch-install-scriptsScripts to aid in installing Arch Linux有助于安装Arch Linux的脚本
extra
ddrescueGNU data recovery toolGNU数据恢复工具
extra
dhclientA standalone DHCP client from the dhcp packagedhcp软件包中的独立DHCP客户端
extra
dnsmasqLightweight, easy to configure DNS forwarder and DHCP server轻巧, 易于配置的DNS转发器和DHCP服务器
extra
f2fs-toolsTools for Flash-Friendly File System (F2FS)闪存文件系统(F2FS)的工具
extra
fsarchiverSafe and flexible file-system backup and deployment tool安全灵活的文件系统备份和部署工具
extra
grml-zsh-configgrml's zsh setupgrml的zsh设置
extra
havegedEntropy harvesting daemon using CPU timings使用CPU时序的熵收集守护程序
extra
irssiModular text mode IRC client with Perl scripting具有Perl脚本的模块化文本模式IRC客户端
extra
lftpSophisticated command line based FTP client基于复杂命令行的FTP客户端
extra
linux-atmDrivers and tools to support ATM networking under Linux.在Linux下支持ATM网络的驱动程序和工具.
extra
lynxA text browser for the World Wide Web万维网的文本浏览器
extra
memtest86+An advanced memory diagnostic tool先进的内存诊断工具
extra
mtoolsA collection of utilities to access MS-DOS disks用来访问MS-DOS磁盘的实用程序的集合
extra
openconnectOpen client for Cisco AnyConnect VPN思科AnyConnect VPN的开放客户端
extra
openvpnAn easy-to-use, robust and highly configurable VPN (Virtual Private Network)简单易用, 功能强大且可高度配置的VPN(虚拟专用网)
extra
rp-pppoeRoaring Penguin's Point-to-Point Protocol over Ethernet client通过以太网客户端咆哮企鹅的点对点协议
extra
rsyncA fast and versatile file copying tool for remote and local files快速和通用的文件复制工具, 用于远程和本地文件
extra
sg3_utilsGeneric SCSI utilities通用SCSI实用程序
extra
testdiskChecks and undeletes partitions + PhotoRec, signature based recovery tool检查并取消删除分区+ PhotoRec, 基于签名的恢复工具
extra
vimVi Improved, a highly configurable, improved version of the vi text editorVi改进版, vi文本编辑器的高度可配置的改进版本
extra
vpncVPN client for cisco3000 VPN Concentrators用于cisco3000 VPN集中器的VPN客户端
extra
zshA very advanced and programmable command interpreter (shell) for UNIXUNIX的非常高级的可编程命令解释器(shell)
extra
bind-tools



broadcom-wlBroadcom 802.11 Linux STA wireless driverBroadcom 802.11 Linux STA无线驱动程序
community
clonezillancurses partition and disk imaging/cloning programncurses分区和磁盘映像/克隆程序
community
darkhttpdA small and secure static webserver小型安全的静态Web服务器
community
iwdInternet Wireless Daemon互联网无线守护进程
community
kitty-terminfoTerminfo for kitty, an OpenGL-based terminal emulatorKitty的Terminfo, 这是一个基于OpenGL的终端模拟器
community
lsscsiA tool that lists devices connected via SCSI and its transports列出通过SCSI及其传输连接的设备的工具
community
mcA file manager that emulates Norton Commander模拟Norton Commander的文件管理器
community
nbdtools for network block devices, allowing you to use remote block devices over TCP/IP网络块设备的工具, 允许您通过TCP / IP使用远程块设备
community
ndisc6Collection of IPv6 networking utilitiesIPv6网络实用程序的集合
community
nvme-cliNVM-Express user space tooling for Linux适用于Linux的NVM-Express用户空间工具
community
partcloneUtilities to save and restore used blocks on a partition在分区上保存和还原已用块的实用程序
community
partimagePartition Image saves partitions in many formats to an image file.分区映像将多种格式的分区保存到映像文件中.
community
reflectorA Python 3 module and script to retrieve and filter the latest Pacman mirror list.一个Python 3模块和脚本, 用于检索和过滤最新的Pacman镜像列表.
community
rxvt-unicode-terminfoTerminfo files for urxvturxvt的Terminfo文件
community
terminus-fontMonospace bitmap font (for X11 and console)等宽字体位图字体(用于X11和控制台)
community
termite-terminfoTerminfo for Termite, a simple VTE-based terminalTermite的Terminfo, 这是一个简单的基于VTE的终端
community
usb_modeswitchActivating switchable USB devices on Linux.在Linux上激活可切换USB设备.
community
wvdialA dialer program to connect to the Internet拨号程序以连接到Internet
community
xl2tpdan open source implementation of the L2TP maintained by Xelerance CorporationXelerance Corporation维护的L2TP的开源实现
community

4. 更多软件包

https://www.archlinux.org/groups/
https://www.archlinux.org/packages/
https://aur.archlinux.org/packages/

2020-07-09

instell-gnu-acct

1. 安装 acct(AUR)
 1.1 下载
 1.2 解压,进入目录,查看PKGBUILD文件
 1.3 安装遇到问题
 1.4 搜索问题
  1.4.1 很可能您的个人密钥环中没有所需的公用密钥来验证下载的文件。
  1.4.2 或者,#使用密钥服务器查找公共密钥。
  1.4.3 要从密钥服务器导入密钥:
 1.5 导入完成后,重新运行安装
 1.6 查看安装结果
2. 简介

1. 安装 acct(AUR)

https://aur.archlinux.org/packages/acct/
aur包安装参考: https://www.cnblogs.com/sztom/p/10597378.html; https://wiki.archlinux.org/index.php/Arch_User_Repository
  • curl -L -O https://.../xx.tar.gz --> tar -xvf xx.tar.gz --> makepkg -si
  • git clone https://.../xx.git --> makepkg -si acct
别忘了查看PKGBUILD文件.

1.1 下载

$ git clone https://aur.archlinux.org/acct.git
Cloning into 'acct'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 7 (delta 0), reused 7 (delta 0), pack-reused 0
Unpacking objects: 100% (7/7), 3.61 KiB | 335.00 KiB/s, done.

1.2 解压,进入目录,查看PKGBUILD文件

$ ls -la
-rwxrwxrwx 1 root root  412 Jul  9 16:17 acct*
-rwxrwxrwx 1 root root  117 Jul  9 16:17 accton-create*
-rwxrwxrwx 1 root root  305 Jul  9 16:17 acct.service*
drwxrwxrwx 1 root root  448 Jul  9 16:17 .git/
-rwxrwxrwx 1 root root 2331 Jul  9 16:17 PKGBUILD*
-rwxrwxrwx 1 root root 1641 Jul  9 16:17 .SRCINFO*

$ cat PKGBUILD
# Maintainer: Sorin-Mihai Vârgolici <sorin-mihai@vargolici.com>
validpgpkeys=('747774305F9DCC9504703CEFB73CBC7708FA8C10') # Markus Gothe <nietzsche@lysator.liu.se>
...
  •  validpgpkeys: 就是public key, 下文命令需要的: key-id, fingerprint
  •  备注里的作者邮件地址, 就是后续命令里需要的: user-id

1.3 安装遇到问题

$ makepkg -si acct
...
  -> Downloading acct-6.6.4.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  833k  100  833k    0     0  31801      0  0:00:26  0:00:26 --:--:-- 21349
  -> Downloading acct-6.6.4.tar.gz.sig...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   813  100   813    0     0   1613      0 --:--:-- --:--:-- --:--:--  1609
  -> Found acct
  -> Found accton-create
  -> Found acct.service
==> Validating source files with md5sums...
    acct-6.6.4.tar.gz ... Passed
...
    acct.service ... Passed
==> Verifying source file signatures with gpg...
    acct-6.6.4.tar.gz ... FAILED (unknown public key B73CBC7708FA8C10)
==> ERROR: One or more PGP signatures could not be verified!
运行时报错, 未知的public key

1.4 搜索问题

1.4.1 很可能您的个人密钥环中没有所需的公用密钥来验证下载的文件。

https://wiki.archlinux.org/index.php/Arch_User_Repository#ERROR:_One_or_more_PGP_signatures_could_not_be_verified!;_what_should_I_do?
详情参见 Makepkg#Signature checking: https://wiki.archlinux.org/index.php/Makepkg#Signature_checking
注意:在makepkg中实现的签名检查不使用pacman的密钥环,而是依靠用户的密钥环keyring。
如果.sig或.asc形式的签名文件是PKGBUILD源数组的一部分,makepkg会自动尝试对其进行验证。
如果用户的密钥环不包含用于签名验证所需的公共密钥public key,makepkg将中止安装,并显示一条消息,提示无法验证PGP密钥。

如果缺少软件包所需的公共密钥public key,则PKGBUILD很可能会包含带有所需密钥ID 的有效validpgpkeys条目。https://wiki.archlinux.org/index.php/PKGBUILD#validpgpkeys
仅接受完整的指纹fingerprints。它们必须是大写字母,并且不能包含空格字符。注意:您可以使用如下找出适当钥匙的指纹。
$ gpg --list-keys --fingerprint <KEYID>
$ gpg --list-keys --fingerprint 747774305F9DCC9504703CEFB73CBC7708FA8C10
gpg: error reading key: No public key

可以手动导入它,也可以在密钥服务器上找到它,然后从那里导入它。
https://wiki.archlinux.org/index.php/GnuPG#Import_a_public_key
为了加密发送给其他人的消息并验证其签名,您需要他们的公钥。要将文件名public.key的公共密钥导入您的公共密钥环,请执行以下操作:
$ gpg --import public.key

1.4.2 或者,#使用密钥服务器查找公共密钥。

https://wiki.archlinux.org/index.php/GnuPG#Use_a_keyserver
您可以在公共PGP密钥服务器上注册密钥,以便其他人无需直接与您联系即可检索您的密钥:
$ gpg --send-keys key-id
警告:密钥一旦提交给密钥服务器,就无法从服务器中删除。
提示:您可以通过如下命令访问密钥ID。密钥ID是sec行中提供的哈希密钥。
$ gpg --list-secret-keys --keyid-format=LONG <email>
要在密钥服务器上查找密钥的详细信息而不导入它,请执行以下操作:
$ gpg --search-keys user-id
$ gpg --search-keys nietzsche@lysator.liu.se
gpg: data source: https://192.146.137.140:443
(1) Markus Gothe <nietzsche@lysator.liu.se>
  4096 bit RSA key B73CBC7708FA8C10, created: 2017-04-09
(2) Markus Gothe <markus@dovado.com>
Markus Gothe <margo284@student.liu.se>
Markus Gothe (Work) <markus@dovado.com>
Markus Gothe <nietzsche@lysator.liu.se>
Markus Gothe (Work) <markus@secon24.com>
Markus Gothe (Work) <markus.gothe@27m.se>
Markus Gothe (Work) <markus.gothe@hps.se>
  1024 bit DSA key E88D17989C7636BC, created: 2004-05-26, expires: 2005-05-26 (revoked) (expired)
Enter number(s), N)ext, or Q)uit >

1.4.3 要从密钥服务器导入密钥:

$ gpg --recv-keys key-id
$ gpg --recv-keys 747774305F9DCC9504703CEFB73CBC7708FA8C10
gpg: key B73CBC7708FA8C10: public key "Markus Gothe <nietzsche@lysator.liu.se>" imported
gpg: Total number processed: 1
gpg:               imported: 1

警告:
您应通过将检索到的公共密钥public key的指纹fingerprint与所有者在独立来源上发布的指纹进行比较(例如,直接与该人联系),来验证其真实性。 有关更多信息,请参见Wikipedia:公钥指纹。https://en.wikipedia.org/wiki/Public_key_fingerprint
使用短ID可能会遇到冲突。将导入所有具有短ID的密钥。为了避免这种情况,请在接收密钥时使用完整的指纹full fingerprint或长密钥long key ID。

最常见的密钥服务器:
  • SKS Keyserver Pool: federated, no verification, keys cannot be deleted.
  • Mailvelope Keyserver: central, verification of email IDs, keys can be deleted.
  • keys.openpgp.org: central, verification of email IDs, keys can be deleted, no third-party signatures (i.e. no Web of Trust support).

1.5 导入完成后,重新运行安装

$ makepkg -si acct

1.6 查看安装结果

$ pacman -Qm
acct 6.6.4-1

$ sudo pacman -Ql acct |grep bin
acct /usr/bin/ac
acct /usr/bin/accton
acct /usr/bin/dump-acct
acct /usr/bin/dump-utmp
acct /usr/bin/lastcomm
acct /usr/bin/sa

$ sudo pacman -Ql acct |grep lib/
acct /usr/lib/acct/accton-create
acct /usr/lib/systemd/system/acct.service

2. 简介

For terminated processes try https://aur.archlinux.org/packages/acct/.  Enable acct.service then check the output of lastcomm.

https://aur.archlinux.org/packages/acct/
https://www.gnu.org/software/acct/
GNU Accounting Utilities提供了用于GNU/Linux和其他系统的登录和处理会计实用程序。

https://www.gnu.org/software/acct/manual/accounting.html
  • ac:显示有关连接时间的统计信息
  • accton:打开或关闭记帐
  • lastcomm:列出最后执行的命令
  • sa:打印会计统计
  • dump-acct:以易于阅读的形式打印记帐文件
安装实用程序可以为系统管理员提供有关系统使用情况的有用信息-连接,执行的程序以及系统资源的使用情况。

有关用户的信息(他们的连接时间,位置,执行的程序等)将由init和自动记录在文件中 login。其中有四个是我们感兴趣的:
  • wtmp,其中包含每次登录和注销的记录;
  • acct,它记录了运行的每个命令;
  • usracct和savacct,分别包含acct按用户和命令输入的信息摘要。
每个记帐实用程序都会报告或汇总存储在这些文件中的信息。
  • ac: 打印有关用户连接时间的统计信息。 ac可以告诉您特定用户或一组用户连接到系统的时间,可以按天或wtmp文件中的所有条目打印总计 。
  • accton: 打开或关闭记帐。
  • lastcomm: 列出在系统上执行的命令,最近的一个,显示每个命令的运行状态。使用last,您可以在acct文件中搜索 特定的用户,终端或命令。
  • sa: 将acct文件中的信息汇总到 savacct和usracct文件中。它还会生成有关命令的报告,给出调用次数,使用的cpu时间,平均内核使用率等。
  • dump-acct
  • dump-utmp: 以人类可读的格式显示acct和utmp文件。

2020-07-02

linux-clean

1. 清理文件系统工具
 1.1 Disk usage display
 1.2 Disk cleaning
2. 软件包清理
 2.1 Package cache 包缓存
 2.2 Unused packages (orphans) 孤儿包
 2.3 Pacman包管理器的使用参考
3. (借助1.2 Disk cleaning的工具)
 3.1 Old configuration files
 3.2 Broken symlinks
 3.3 使用BleachBit清理Home目录
4. 多语言
5. pkglist

1. 清理文件系统工具

https://wiki.archlinux.org/index.php/System_maintenance#Clean_the_filesystem
在寻找要删除的文件时,重要的是找到占用磁盘空间最多的文件。可以在以下位置找到有助于此目的的程序:

1.1 Disk usage display

应用程序列表#磁盘使用情况显示。https://wiki.archlinux.org/index.php/List_of_applications#Disk_usage_display

1.2 Disk cleaning

应用程序列表#磁盘清洁。https://wiki.archlinux.org/index.php/List_of_applications#Disk_cleaning

2. 软件包清理

2.1 Package cache 包缓存

https://wiki.archlinux.org/index.php/System_maintenance#Package_cache
Remove unwanted .pkg files from /var/cache/pacman/pkg/ to free up disk space.
See Pacman#Cleaning the package cache for more information.
https://wiki.archlinux.org/index.php/Pacman#Cleaning_the_package_cache
$ sudo paccache -rk1
$ sudo pacman -Sc

2.2 Unused packages (orphans) 孤儿包

Remove unused packages from the system to free up disk space and simplify maintenance.
See Pacman/Tips and tricks#Removing unused packages (orphans) for details.
https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Removing_unused_packages_(orphans)
$ sudo pacman -Qqdt | sudo pacman -Rs -
$ sudo pacman -Rns $(pacman -Qtdq)

2.3 Pacman包管理器的使用参考

pacman-help; Arch-pacman-Tips-And-Tricks; Arch Linux 软件包的查询及清理; archlinux-pacdiff

3. (借助1.2 Disk cleaning的工具)

3.1 Old configuration files

https://wiki.archlinux.org/index.php/System_maintenance#Old_configuration_files
旧的配置文件可能与较新的软件版本冲突,或者随着时间的推移而损坏。定期删除不需要的配置,尤其是在主文件夹和中~/.config。出于类似原因,在安装之间共享主文件夹时要小心。
查找以下文件夹:
~/.config/ -应用程序存储其配置的位置
~/.cache/ -某些程序的缓存大小可能会增加
~/.local/share/ -旧文件可能躺在那里
有关更多信息,请参见XDG基本目录支持。https://wiki.archlinux.org/index.php/XDG_Base_Directory_support
为了使主目录免受在错误位置创建的临时文件的影响,最好管理一系列不需要的文件并定期删除它们,例如,使用rmshit.py。
rmlint可用于查找并有选择地删除重复文件,空文件,递归空目录和损坏的符号链接。

3.2 Broken symlinks

https://wiki.archlinux.org/index.php/System_maintenance#Broken_symlinks
旧的断开的符号链接可能位于您的系统中。您应该删除它们。可以在以下链接找到实现此目标的示例。但是,您不应盲目删除所有断开的符号链接,因为其中某些符号链接可以达到目的。
https://unix.stackexchange.com/questions/34248/how-can-i-find-broken-symlinks
http://www.commandlinefu.com/commands/view/8260/find-broken-symlinks
要快速列出系统中所有损坏的符号链接,请使用:
  $ sudo find / -xtype l -print
然后检查并从该列表中删除不必要的条目。

3.3 使用BleachBit清理Home目录

  1. 打开BleachBit, 左侧勾选需要清理的项目;
  2. 点击上方[Preview]预览, 程序会扫描相关目录并列出认为可以删除的文件列表;
  3. 通过滚动条浏览没有问题, 就可以点击上方的[Clean]清理这些文件了.
注: 第一次使用, 建议不要全选, 逐个选择项目,扫描出的文件列表不会太长, 方便勘查. > [Preview]预览 > [Clean]清理

4. 多语言

https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#Installing_only_content_in_required_languages
仅安装所需语言的内容
许多软件包尝试安装多种语言的文档和翻译。某些程序旨在删除此类不必要的文件,例如localepurgeAUR,它在安装软件包后运行以删除不需要的语言环境文件。通过pacman.conf中的NoExtract指令提供了一种更直接的方法,该方法可以防止安装这些文件。
警告:一些用户指出,即使在Xorg下,删除语言环境也会导致意想不到的后果。
下面的示例安装英语(美国)文件,或完全不安装:
/etc/pacman.conf
NoExtract = usr/share/help/* !usr/share/help/en*
NoExtract = usr/share/gtk-doc/html/*
NoExtract = usr/share/locale/* usr/share/X11/locale/* usr/share/i18n/* opt/google/chrome/locales/* !usr/share/X11/locale/C/*
NoExtract = !*locale*/en*/* !usr/share/i18n/charmaps/UTF-8.gz !usr/share/*locale*/locale.*
NoExtract = !usr/share/*locales/en_?? !usr/share/*locales/i18n* !usr/share/*locales/iso*
NoExtract = !usr/share/*locales/trans*
NoExtract = usr/share/qt4/translations/*
NoExtract = usr/share/man/* !usr/share/man/man*
NoExtract = usr/share/vim/vim*/lang/*
NoExtract = usr/lib/libreoffice/help/en-US/*

5. pkglist

https://wiki.archlinux.org/index.php/Pacman/Tips_and_tricks#List_of_installed_packages
保留所有明确安装的软件包的列表对于例如备份系统或加快在新系统上的安装非常有用:
$ pacman -Qqe > pkglist.txt
要从以前保存的软件包列表中安装软件包,而又不重新安装已经是最新的软件包,请运行:
$ sudo pacman -S --needed - < pkglist.txt
但是,列表中可能存在诸如来自AUR或本地安装的外部软件包。要从列表中过滤出外部软件包,可以按如下方式丰富前一个命令行:
$ sudo pacman -S --needed $(comm -12 <(pacman -Slq | sort) <(sort pkglist.txt))
最终,要确保系统中已安装的软件包与列表匹配,并删除其中未提及的所有软件包:
$ sudo pacman -Rsu $(comm -23 <(pacman -Qq | sort) <(sort pkglist.txt))

列出软件包中所有更改的文件
# paccheck --md5sum --quiet
重新安装所有软件包
# pacman -Qqn | pacman -S -

6. 更多参考阅读

https://www.ibm.com/developerworks/cn/linux/1310_caoyq_linuxdelete/index.html
给 Linux 系统“减肥” 201310

查找重复文件-fdupes和fslint的比较 |2012年6月2日-09:02 |drad
http://www.adercon.com/ac/node/56

如何查找(和删除)重复文件 2017-11-10
https://ubuntuqa.com/article/453.html
https://askubuntu.com/questions/3865/how-to-find-and-delete-duplicate-files
https://qastack.cn/ubuntu/3865/how-to-find-and-delete-duplicate-files

https://qastack.cn/superuser/801746/how-to-deduplicate-40tb-of-data
find -not -empty -type f -printf "%s\n" | sort -rn | uniq -d | xargs -I{} -n1 find -type f -size {}c -print0 | xargs -0 md5sum | sort | uniq -w32 --all-repeated=separate

https://rmlint.readthedocs.io/en/latest/cautions.html
注意事项(或为什么很难编写dupefinder)
本节介绍安全删除重复项的良好做法。它无意与专门相关rmlint。它包括有关重复检测的一般性讨论,并举例说明了重复发现者可能会陷入的陷阱。本部分不仅对重复查找者的开发人员有用,而且对寻求有关重复数据删除最佳实践的用户也很有帮助。
删除重复项时的良好做法...

https://rmlint.readthedocs.io/en/latest/benchmarks.html
基准
该页面包含我们的基准测试套件针对当前版本渲染的图像。基准套件里面,rmlint被质疑与其他流行的一些鲜为人知的重复的发现者。除此之外,还使用了一个非常笨拙的重复查找baseline.py程序,该程序用于查看程序将盲目地哈希找到的所有文件的速度。幸运的是,这些程序都没有 那么慢。我们将在图上进行一些说明,尽管我们将重点放在上rmlint。当然,您可以自由地解释不同的事物,也可以 在自己的计算机上重新运行基准测试。图中给出了每个程序的确切版本。


AC-power

导航 (返回顶部) 1. AC 1.1 Alternating current 1.2 简谐交流电 1.3 频率 1.4 峰值和有效值 2. 交流电相位分类 2.1 单相电 2.2 三相电 2.3 比较 2.4 220v交流电的3个电压值 2.5 相电压与...