我使用Fedora,这些目录包含大量文件,不知道是否可以删除它们?系统空间不足。
Fedora 相当于 Debian build-essential 软件包是什么?
这个文件夹是什么:/run/user/1000
在我的 Fedora 系统上,它有什么作用?
~ $ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.2G 20K 1.2G 1% /run/user/1000
Run Code Online (Sandbox Code Playgroud)
编辑:2019 年 6 月 7 日。
我的两个答案不同意这个地方存储的目录或文件的位置:
帕特里克:
在此之前
systemd
,这些应用程序通常将其文件存储在/tmp
.
再次在这里:
/tmp
是由 指定的唯一位置,FHS
它是本地的,并且可以被所有用户写入。
布雷亚姆:
该目录的用途曾经由
/var/run
. 通常,程序可能会继续使用/var/run
以满足/run
为向后兼容性目的而制定的要求。
再次在这里:
已迁移到使用的程序
/run
应停止使用/var/run
,除非在 部分中注明/var/run
。
/run/user/1000
,为什么在任何一个答案中都没有提到另一个关于之前使用的目录的说法/run/user
。我想我很久以前读过一些关于这个的东西,但我不记得它是如何完成的。本质上,我有一个服务/etc/init.d
,我想在启动时自动启动。我记得这与将脚本符号链接到/etc/rc.d
目录有关,但我现在不记得了。这是什么命令?
我相信我在使用 Fedora/CentOS 衍生产品。
在 Debian 系列操作系统中,dpkg --search /bin/ls
给出:
coreutils: /bin/ls
Run Code Online (Sandbox Code Playgroud)
也就是说,该文件/bin/ls
属于名为coreutils的 Debian 软件包。(如果您对包含未安装文件的包感兴趣,请参阅此帖子)
Fedora 的等价物是什么?
如何从特定存储库(例如,“epel”)获取已安装在我的系统上的所有 RPM 软件包的列表?
我注意到主题行中引用的文件夹占用了 1.5 GB。我可以运行以下命令来清除它而不会对我的系统造成永久性损坏吗?
rm -rf /var/cache/PackageKit/metadata/updates/packages/*
Run Code Online (Sandbox Code Playgroud) 在最近升级到 Fedora 15 后,我发现许多工具失败并出现以下错误:
tail: inotify resources exhausted
tail: inotify cannot be used, reverting to polling
Run Code Online (Sandbox Code Playgroud)
这不仅仅是tail
报告 inotify 的问题。有没有办法询问内核以找出正在消耗 inotify 资源的进程?当前与 inotify 相关的sysctl
设置如下所示:
fs.inotify.max_user_instances = 128
fs.inotify.max_user_watches = 8192
fs.inotify.max_queued_events = 16384
Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个 systemd 用户单元并让它在系统启动时启动。该服务会手动启动,但不会在启动时启动。
从网上搜索我了解到,为了让用户单元在启动时启动,我应该运行loginctl enable-linger <username>
,但这似乎根本没有效果。事实上,手册页说:
Run Code Online (Sandbox Code Playgroud)Enable/disable user lingering for one or more users. If enabled for a specific user, a user manager is spawned for the user at boot and kept around after logouts. This allows users who are not logged in to run long-running services.
尽管运行此命令,但我的服务并未在启动时启动。
loginctl enable-linger error
Run Code Online (Sandbox Code Playgroud)
那个单位:
$ cat ~/.config/systemd/user/thin\@.service
[Unit]
Description=A fast and very simple Ruby web server
[Service]
Type=simple
EnvironmentFile=/home/error/.config/thin/%i
ExecStart=/usr/bin/bash /home/error/.rvm/wrappers/%i/thin start -a $THIN_BIND -p $THIN_PORT
WorkingDirectory=/srv/www/%i
PrivateTmp=true
[Install]
WantedBy=multi-user.target …
Run Code Online (Sandbox Code Playgroud) 在 Ubuntu 中(我猜在 Debian 中也是如此)有一个名为的系统脚本update-grub
,它会grub-mkconfig -o
使用 grub 配置文件的正确路径自动执行。
基于 Red Hat 的发行版是否有类似的命令?
如果没有,系统如何知道安装新内核版本时要更新的 grub 配置文件在哪里?
fedora ×10
packaging ×2
rhel ×2
boot ×1
centos ×1
compiling ×1
disk-cleanup ×1
disk-usage ×1
dnf ×1
filenames ×1
filesystems ×1
grub ×1
init-script ×1
inotify ×1
kernel ×1
linux ×1
rpm ×1
services ×1
systemd ×1
yum ×1