AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-259284

illiterate's questions

Martin Hope
illiterate
Asked: 2019-03-01 20:38:49 +0800 CST

如何在此处文档中转义空字符?(bash 和/或破折号)

  • 4

我想shuf --zero-terminated用 here-document 处理多行字符串。

bash dash
  • 3 个回答
  • 1077 Views
Martin Hope
illiterate
Asked: 2019-02-22 21:17:24 +0800 CST

为什么重复 mount --bind 会导致 /dev/pts 为空?

  • 4
$ ls /dev/pts
0  1  ptmx
$ sudo mount --bind /dev /mnt
$ ls /dev/pts
0  1  ptmx
$ sudo mount --bind /dev /mnt
$ ls /dev/pts
$ 

我在带有 Linux 4.14.13 内核的 D​​ebian 9 上运行。

linux debian
  • 1 个回答
  • 625 Views
Martin Hope
illiterate
Asked: 2018-10-12 03:37:07 +0800 CST

mksquashfs 的“伪定义”、“伪文件”、“排序文件”的详细信息(示例)?

  • 2

从 debian 拉伸手册页:

Filesystem filter options
   -p PSEUDO_DEFINITION
       Add pseudo file definition.

   -pf PSEUDO_FILE
       Add list of pseudo file definitions.

   -sort SORT_FILE
       sort files according to priorities in SORT_FILE. One file or dir with priority per line. Priority -32768 to 32767, default priority 0.

但是如何写PSEUDO_DEFINITION,PSEUDO_FILE和SORT_FILE?

debian squashfs
  • 1 个回答
  • 776 Views
Martin Hope
illiterate
Asked: 2018-09-29 08:50:44 +0800 CST

如何在不损坏我的数据的情况下终止/终止正在运行的 e4defrag?

  • 6

如果我杀死了 running e4defrag,是否存在数据丢失/损坏的风险?有没有安全的方法来中断它?

例如:e4defrag在大分区(如根目录)或大文件(如 squashfs 系统映像文件)上运行非常慢,所以有时e4defrag需要在完成之前停止/杀死,但我不确定是否杀死它(通过发送SIGINT, SIGTERM,SIGKILL等)e4defrag是安全的吗?

我正在运行 Debian Stretch,文件系统是 ext4。
我的内核版本:4.14.13
我的e2fsprogs 版本:1.43.4-2

debian linux-kernel
  • 3 个回答
  • 1459 Views
Martin Hope
illiterate
Asked: 2018-09-24 01:28:45 +0800 CST

当左命令产生大输出时,如何在破折号中检查左命令在管道“左|右”中的退出状态

  • 2

似乎变量“PIPESTATUS”在dash. 简单的单独执行不起作用,因为左侧命令会产生非常大的输出。我使用了一个fifo来完成这个任务:

#!/bin/dash
mkfifo command1 command2
dash -c "cat ./content;code=\${?};echo \${code} > command1 &" | dash -c "md5sum;code=\${?};echo \${code} > command2 &"
echo "$(cat ./command1)" "$(cat ./command2)"

但我不知道为什么它挂了?

pipe dash
  • 2 个回答
  • 561 Views
Martin Hope
illiterate
Asked: 2018-09-21 06:19:31 +0800 CST

“find /var/log -type f -delete”在 Debian 9 上安全吗?

  • 1

我从不查看或关心其中的文件,/var/log/ 并希望避免logrotate浪费我的系统资源(CPU、RAM、I/O 等)。/var/log/某些核心 Debian 程序(例如 apt、aptitude 等)是否需要任何常规文件才能正常工作?

如果您删除 /var/log 中的所有内容,您很可能会在很短的时间内收到大量错误消息,因为其中存在预期存在的文件夹(例如 exim4、apache2、apt、cups、mysql、samba和更多)

debian find
  • 1 个回答
  • 1290 Views
Martin Hope
illiterate
Asked: 2018-09-04 01:38:24 +0800 CST

为什么我可以(或不能)再次挂载已挂载的设备?怎么了?

  • 2

为什么我可以(或不能)再次挂载已挂载的设备?怎么了?
例如:

/tmp/test$ sudo mount /dev/sda5 ./1;echo ${?}
0
/tmp/test$ sudo mount /dev/sda5 ./2;echo ${?}
0
/tmp/test$ sudo mount | grep test
/dev/sda5 on /tmp/test/1 type ext4 (rw,relatime,data=ordered)
/dev/sda5 on /tmp/test/2 type ext4 (rw,relatime,data=ordered)
/tmp/test$ sudo umount ./1 ./2;echo ${?}
0
/tmp/test$ sudo losetup
NAME       SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE          DIO
/dev/loop0         0      0         0  0 /tmp/test/grub.iso   0
/tmp/test$ sudo mount /dev/loop0 ./1;echo ${?}
mount: /dev/loop0 is write-protected, mounting read-only
0
/tmp/test$ sudo mount /dev/loop0 ./2;echo ${?}
mount: /dev/loop0 is already mounted or /tmp/test/2 busy
       /dev/loop0 is already mounted on /tmp/test/1
32
/tmp/test$ sudo mount | grep test
/dev/loop0 on /tmp/test/1 type iso9660 (ro,relatime,nojoliet,check=s,map=n,blocksize=2048)
/tmp/test$ 
mount devices
  • 2 个回答
  • 2309 Views
Martin Hope
illiterate
Asked: 2018-09-03 21:58:10 +0800 CST

为什么 grub-mkrescue 不接受“--core-compress=xz”选项?

  • 4

是缺少一些包还是缺少一些其他选项?还是只是 grub-mkresuce 的一个错误?是选项的一些例子--core-compress=吗?

$ grub-mkrescue --core-compress=xz --compress=xz -o grub.iso ./iso
grub-mkrescue: --core-compress: (PROGRAM ERROR) Option should have been recognized!?
Try 'grub-mkrescue --help' or 'grub-mkrescue --usage' for more information.
debian grub2
  • 1 个回答
  • 370 Views
Martin Hope
illiterate
Asked: 2018-08-18 07:44:35 +0800 CST

什么是“ext4-rsv-conver”过程?

  • 5

有没有人有关于 的文档ext4-rsv-conver?

$ pgrep -a -f ext4-rsv-conver 
153 ext4-rsv-conver
161 ext4-rsv-conver
7451 ext4-rsv-conver
$ dpkg -S ext4-rsv-conver
dpkg-query: no path found matching pattern *ext4-rsv-conver*

ext4-rsv-conver我在 Google 中找不到任何相关信息。我的系统是 Debian 9。

linux process
  • 1 个回答
  • 4913 Views
Martin Hope
illiterate
Asked: 2018-06-30 02:38:01 +0800 CST

哪个程序在 Debian 9 中运行 $XDG_CONFIG_HOME/autostart?

  • 2

哪个程序$XDG_CONFIG_HOME/autostart在 Debian 9 中运行?

我尝试将以下.desktop文件放入$XDG_CONFIG_HOME/autostart:

[Desktop Entry]
Type=Application
Name=test
Comment=test
NoDisplay=true
Exec=sh -c 'cat /proc/$$/status >~/test_output'
NotShowIn=GNOME;KDE;XFCE;

它的 PPID 为 1 ( systemd),但我找不到 systemd 如何处理$XDG_CONFIG_HOME/autostart条目。

debian systemd
  • 1 个回答
  • 330 Views
Martin Hope
illiterate
Asked: 2018-04-11 20:30:19 +0800 CST

Debian Stretch 上通知守护进程的“提供者”字段是什么?

  • 0

Debian Stretch 上通知守护进程的“提供者”字段是什么?

这是否意味着虚拟包?

但是Debian Stretch 上的 notification-daemon似乎不是一个虚拟包,因为它有一个具体的文件列表

$ aptitude show notification-daemon
Package: notification-daemon             
Version: 3.20.0-1+b1
State: installed
Automatically installed: yes
Priority: optional
Section: x11
Maintainer: Debian GNOME Maintainers <pkg-gnome-maintainers@lists.alioth.debian.org>
Architecture: i386
Uncompressed Size: 398 k
Depends: libatk1.0-0 (>= 1.12.4), libc6 (>= 2.4), libcairo2 (>= 1.10.0), libgdk-pixbuf2.0-0 (>= 2.22.0), libglib2.0-0 (>= 2.37.3), libgtk-3-0 (>= 3.19.12), libpango-1.0-0 (>=
         1.14.0), libx11-6
Provided by: cinnamon (3.2.7-4), dunst (1.1.0-2+b1), gnome-flashback (3.22.0-3), gnome-shell (3.22.3-3), lxqt-notificationd (0.11.1-1), mate-notification-daemon (1.16.1-1),
             mate-notification-daemon (1.18.1-1~bpo9+1), notify-osd (0.9.35+15.04.20150126-1+b1), plasma-workspace (4:5.8.6-2.1+deb9u1), python-jarabe (0.110.0-3), xfce4-notifyd
             (0.3.4-1)
Description: daemon for displaying passive pop-up notifications
 notification-daemon displays passive pop-up notifications, as per the Desktop Notifications Specification. 

 The Desktop Notifications Specification provides a standard way of doing passive pop-up notifications on the Linux desktop. These are designed to notify the user of something
 without interrupting their work with a dialog box that they must close.  Passive popups can automatically disappear after a short period of time.
Homepage: https://git.gnome.org/browse/notification-daemon/
Tags: implemented-in::c, interface::daemon, interface::graphical, interface::x11, role::program, uitoolkit::gtk, use::monitor, x11::applet, x11::application
debian
  • 1 个回答
  • 51 Views
Martin Hope
illiterate
Asked: 2018-03-29 01:32:14 +0800 CST

如何获得“man mount”中提到的“PAGE_CACHE_SIZE”的值?

  • 2

如何获得PAGE_CACHE_SIZE中提到的值man mount?

man mount:

tmpfs 的挂载选项

size=nbytes 覆盖文件系统的默认最大大小。大小以字节为单位,四舍五入到整页。默认为内存的一半。size 参数还接受后缀 % 以将此 tmpfs 实例限制为物理 RAM 的该百分比:当既未指定 size 也未指定 nr_blocks 时,默认值为 size=50%。

nr_blocks= 与大小相同,但在 PAGE_CACHE_SIZE 的块中

linux debian
  • 1 个回答
  • 473 Views
Martin Hope
illiterate
Asked: 2018-02-19 07:27:47 +0800 CST

正则表达式中的 [-az] 和 [az] 有什么区别?

  • 0

-正则表达式中的[az] 和 [az] 有什么区别?-[ az]中的第一个减号是什么意思?

从默认/etc/adduser.conf(例如):

#check user and group names also against this regular expression.`
#NAME_REGEX="^[a-z][-a-z0-9_]*\$" 
regular-expression
  • 2 个回答
  • 1510 Views
Martin Hope
illiterate
Asked: 2018-02-16 01:00:58 +0800 CST

如何可靠地将 /proc/pid/environ 转换为 env 命令的参数?

  • 2

如何可靠地将 /proc/pid/environ 转换为 env 命令的参数?

  • IFS=$'\n' ; env -i $(xargs -0n1 -a /proc/$$/environ)仅当所有环境变量都没有换行符时才有效。
  • IFS=$'\0'不能在 bash 和 dash 中工作。

有没有其他可用的方式(包括任何其他的外壳方式)?

bash shell
  • 1 个回答
  • 832 Views
Martin Hope
illiterate
Asked: 2018-02-15 04:59:20 +0800 CST

'array=X' 是否总是分配给 bash 中的第一个元素?

  • 6

'array=X' 是否总是分配给 bash 中的第一个元素?如果不是这样,也许我需要一些“例如”来理解来自 man bash 页面的以下文本:

分配给索引数组时,如果提供了可选的括号和下标,则将该索引分配给;否则,分配的元素的索引是语句分配的最后一个索引加一。

请。

bash array
  • 1 个回答
  • 1155 Views
Martin Hope
illiterate
Asked: 2018-02-02 20:35:08 +0800 CST

zstd for zram 在 Linux 4.15 中是否真的可用?

  • 3

我在zstd中找到/drivers/block/zram/zcomp.c,但在 中找不到任何与 zstd 相关的内容/crypto。那么用于 zram 的 zstd 在 Linux 4.15 中是否真的可用?

linux kernel
  • 1 个回答
  • 1440 Views
Martin Hope
illiterate
Asked: 2017-12-08 00:14:33 +0800 CST

运行目标程序时(之前)如何设置“oom_score_adj”?

  • 3

直接设置echo 1000 >/proc/<pid>/oom_score_adj不可靠,因为目标程序已经在运行,这种情况下可能是目标程序之前导致OOMecho 1000 >/proc/<pid>/oom_score_adj

linux debian
  • 2 个回答
  • 5745 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve