侏儒终端:
$ sudo update-grub
[sudo] password for user:
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
done
Run Code Online (Sandbox Code Playgroud)
从tty1由作为访问Ctrl+ Alt+ F1:
$ sudo update-grub
[sudo] password for user:
Generating grub configuration file ...
Found background image: .background_cache.png
Found linux image: /boot/vmlinuz-3.16.0-4-amd64
Found initrd image: /boot/initrd.img-3.16.0-4-amd64
[ 1603.545926] EXT4-fs (sda2): unable to read superblock
... (repeats twice)
[ 1603.560671] FAT-fs (sda2): invalid media value (0x4c)
... (repeats once)
[ …
Run Code Online (Sandbox Code Playgroud) 从stdbuf --help
(GNU)的输出:
Usage: stdbuf OPTION... COMMAND
Run COMMAND, with modified buffering operations for its standard streams.
...
NOTE: If COMMAND adjusts the buffering of its standard streams ('tee' does
for example) then that will override corresponding changes by 'stdbuf'.
Also some filters (like 'dd' and 'cat' etc.) don't use streams for I/O,
and are thus unaffected by 'stdbuf' settings.
Run Code Online (Sandbox Code Playgroud)
我很困惑在这种情况下“I/O 流”的确切定义是什么,以及它cat
具体如何适用。如果它不使用标准 I/O 流,那么它使用什么?相关的手册页和网络搜索未能提供进一步的洞察力。
学习TLDP 的高级 Bash 脚本指南我无法在 debian 9 的 bash 4.4.12 中重建以下 shell 输出,包括 tty 和 pts:
bash$ lsof -a -p $$ -d0,1,2
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
bash 363 bozo 0u CHR 136,1 3 /dev/pts/1
bash 363 bozo 1u CHR 136,1 3 /dev/pts/1
bash 363 bozo 2u CHR 136,1 3 /dev/pts/1
bash$ exec 2> /dev/null
bash$ lsof -a -p $$ -d0,1,2
COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME
bash 371 bozo 0u CHR …
Run Code Online (Sandbox Code Playgroud)