Почему конкретная man
страница (в моем случае для nc
команды) будет иметь сегодняшнюю дату, а я не буду обновлять систему? Кроме того, почему в журнале «автоматическое обновление» не отображаются какие-либо конкретные действия на этот день?
2018-03-14 07:47:38,124 INFO Initial blacklisted packages:
2018-03-14 07:47:38,135 INFO Starting unattended upgrades script
2018-03-14 07:47:38,135 INFO Allowed origins are: ['o=LinuxMint,a=qiana-security', 'o=LinuxMintESM,a=qiana']
2018-03-14 07:47:51,767 INFO No packages found that can be upgraded unattended and no pending auto-removals
Это нижний колонтитул для nc
справочной страницы:
BSD March 14, 2018 BSD
Это на Linux Mint 17 (qiana), на основе Ubuntu 14.04 (trusty) с groff 1.22.2 и man-db 2.6.7.1.
РЕДАКТИРОВАТЬ
Вывод запрошенных команд:
man -aw nc
/usr/share/man/man1/nc_openbsd.1.gz
ls -ld $(man -aw nc)
-rw-r--r-- 1 root root 5.7K Dec 4 2012 /usr/share/man/man1/nc_openbsd.1.gz
Что странно ...
dpkg -S $(man -aw nc)
?netcat-openbsd: /usr/share/man/man1/nc_openbsd.1.gz
type -a man
man is /usr/bin/man
zgrep docdate $(man -aw nc)
.Dd $Mdocdate: February 7 2012 $
ДОБАВЛЕННЫЙ ФУТБОЛ
strace -f man nc 2>&1 | grep -e '^BSD' -e '"/.*nc'
ychaouche#ychaouche-PC 14:31:15 ~ $ strace -f man nc 2>&1 | grep -e '^BSD' -e '"/.*nc' execve("/usr/bin/man", ["man", "nc"], [/* 87 vars */]) = 0 lstat("/usr/share/man/man1/nc.1.gz", {st_mode=S_IFLNK|0777, st_size=25, ...}) = 0 lstat("/usr/share/man/man1/nc.1.gz", {st_mode=S_IFLNK|0777, st_size=25, ...}) = 0 readlink("/usr/share/man/man1/nc.1.gz", "/etc/alternatives/nc.1.gz", 4095) = 25 lstat("/etc/alternatives/nc.1.gz", {st_mode=S_IFLNK|0777, st_size=35, ...}) = 0 readlink("/etc/alternatives/nc.1.gz", "/usr/share/man/man1/nc_openbsd.1"..., 4095) = 35 lstat("/usr/share/man/man1/nc_openbsd.1.gz", {st_mode=S_IFREG|0644, st_size=5756, ...}) = 0 stat("/usr/share/man/man1/nc_openbsd.1.gz", {st_mode=S_IFREG|0644, st_size=5756, ...}) = 0 stat("/usr/share/man/man1/nc_openbsd.1.gz", {st_mode=S_IFREG|0644, st_size=5756, ...}) = 0 open("/usr/share/man/man1/nc_openbsd.1.gz", O_RDONLY) = 3 access("/usr/share/man/man1/nc.1.gz", R_OK) = 0 lstat("/usr/share/man/man1/nc.1.gz", {st_mode=S_IFLNK|0777, st_size=25, ...}) = 0 lstat("/usr/share/man/man1/nc.1.gz", {st_mode=S_IFLNK|0777, st_size=25, ...}) = 0 readlink("/usr/share/man/man1/nc.1.gz", "/etc/alternatives/nc.1.gz", 4095) = 25 lstat("/etc/alternatives/nc.1.gz", {st_mode=S_IFLNK|0777, st_size=35, ...}) = 0 readlink("/etc/alternatives/nc.1.gz", "/usr/share/man/man1/nc_openbsd.1"..., 4095) = 35 lstat("/usr/share/man/man1/nc_openbsd.1.gz", {st_mode=S_IFREG|0644, st_size=5756, ...}) = 0 stat("/usr/share/man/man1/nc_openbsd.1.gz", {st_mode=S_IFREG|0644, st_size=5756, ...}) = 0 stat("/usr/share/man/man1/nc_openbsd.1.gz", {st_mode=S_IFREG|0644, st_size=5756, ...}) = 0 open("/usr/share/man/man1/nc_openbsd.1.gz", O_RDONLY) = 3 stat("/usr/share/man/man1/nc.1.gz", {st_mode=S_IFREG|0644, st_size=5756, ...}) = 0 stat("/usr/share/man/cat1/nc.1.gz", 0x7fffa49c0940) = -1 ENOENT (No such file or directory) stat("/usr/share/man/man1/nc_openbsd.1.gz", {st_mode=S_IFREG|0644, st_size=5756, ...}) = 0 open("/usr/share/man/man1/nc_openbsd.1.gz", O_RDONLY) = 3 [pid 3878] stat("/usr/share/man/man1/nc_openbsd.1.gz", {st_mode=S_IFREG|0644, st_size=5756, ...}) = 0 [pid 3878] access("/usr/share/man/man1/nc_openbsd.1.gz", R_OK <unfinished ...> BSD March 20, 2018 BSD
strace -f man nc 2>&1 | grep -vwe -1 | grep -o '"/[^"]*"' | sort -u | grep -v /dev/ | xargs sh -c 'zgrep "March 14" "$@"' sh 2> /dev/null
no output
похоже дата не жестко запрограммирована. Может быть макрос, генерирующий сегодняшнюю дату.
env | grep -e ROFF -e MAN -e GRO
SESSION_MANAGER=local/ychaouche-PC:@/tmp/.ICE-unix/2915,unix/ychaouche-PC:/tmp/.ICE-unix/2915 MANDATORY_PATH=/usr/share/gconf/default.mandatory.path
env -i man nc
показывает сегодняшнюю дату (20 марта 2018 г.)zcat /usr/share/man/man1/nc_openbsd.1.gz | nroff -mandoc | grep BSD
ychaouche#ychaouche-PC 06:59:53 ~ $ zcat /usr/share/man/man1/nc_openbsd.1.gz | nroff -mandoc | grep BSD NC(1) BSD General Commands Manual NC(1) BSD March 20, 2018 BSD ychaouche#ychaouche-PC 07:01:41 ~ $
strace -f man nc 2>&1 | grep -vwe -1 | grep -o '"/[^"]*tmac/[^"]*"' | sort -u | xargs ls -lrtd
ychaouche#ychaouche-PC 17:26:08 /usr/share/man/man1 $ unalias ls ychaouche#ychaouche-PC 17:26:12 /usr/share/man/man1 $ unalias xargs ychaouche#ychaouche-PC 17:26:14 /usr/share/man/man1 $ unalias grep ychaouche#ychaouche-PC 17:26:16 /usr/share/man/man1 $ strace -f man nc 2>&1 | grep -vwe -1 | grep -o '"/[^"]*tmac/[^"]*"' | sort -u | xargs ls -lrtd -rw-r--r-- 1 root root 4065 Jan 22 2014 /usr/share/groff/1.22.2/tmac/papersize.tmac -rw-r--r-- 1 root root 1860 Jan 22 2014 /usr/share/groff/1.22.2/tmac/andoc.tmac -rw-r--r-- 1 root root 71 Jan 22 2014 /usr/share/groff/1.22.2/tmac/unicode.tmac -rw-r--r-- 1 root root 1552 Jan 22 2014 /usr/share/groff/1.22.2/tmac/tty.tmac -rw-r--r-- 1 root root 5183 Jan 22 2014 /usr/share/groff/1.22.2/tmac/tty-char.tmac -rw-r--r-- 1 root root 1145 Jan 22 2014 /usr/share/groff/1.22.2/tmac/troffrc-end -rw-r--r-- 1 root root 1387 Jan 22 2014 /usr/share/groff/1.22.2/tmac/troffrc -rw-r--r-- 1 root root 4729 Jan 22 2014 /usr/share/groff/1.22.2/tmac/pspic.tmac -rw-r--r-- 1 root root 22042 Jan 22 2014 /usr/share/groff/1.22.2/tmac/mdoc/doc-syms -rw-r--r-- 1 root root 4048 Jan 22 2014 /usr/share/groff/1.22.2/tmac/mdoc/doc-nroff -rw-r--r-- 1 root root 29284 Jan 22 2014 /usr/share/groff/1.22.2/tmac/mdoc/doc-common -rw-r--r-- 1 root root 2250 Jan 22 2014 /usr/share/groff/1.22.2/tmac/latin1.tmac -rw-r--r-- 1 root root 27860 Jan 22 2014 /usr/share/groff/1.22.2/tmac/hyphen.us -rw-r--r-- 1 root root 15678 Jan 22 2014 /usr/share/groff/1.22.2/tmac/hyphenex.us -rw-r--r-- 1 root root 1362 Jan 22 2014 /usr/share/groff/1.22.2/tmac/fallbacks.tmac -rw-r--r-- 1 root root 73807 Jan 22 2014 /usr/share/groff/1.22.2/tmac/doc.tmac -rw-r--r-- 1 root root 537 Jan 22 2014 /usr/share/groff/1.22.2/tmac/composite.tmac -rw-r--r-- 1 root root 704 Jan 22 2014 /usr/share/groff/site-tmac/mdoc.local ychaouche#ychaouche-PC 17:26:18 /usr/share/man/man1 $
type -a man
Вывод поможет.
-0
и не --delimiter='\n'
имеют смысла вместе (один устанавливает разделитель на NUL, другой на LF)