Разница в результатах команды cat в разных местах

The solution is likely to be found at this question the short version being, run

sudo yum install "kernel-devel-uname-r == $(uname -r)"

That will install the kernel headers for the version of the kernel you are currently running.

I suspect that at some point you did a yum update or similar, and that actually installed a new kernel, but you have not yet started running it. What is probably happening is that when you do the yum install steps in your question it is looking at the latest installed version and getting the headers for that. Howerver, when you start vboxdrv it looks at the running kernel and tries to find the headers for that.

Your running and installed kernels are out of sync (which isn't normally a huge problem), but you found a case where it matters.

0
12.03.2018, 05:46
2 ответа
cat./-file2

выводит файл с именем -file2в текущем каталоге.

cat maybehere07/.file2

выводит имя файла .file2в подкаталоге maybeyere07.

В первой команде ваш текущий каталог был maybehere07; во втором ваш текущий каталог был родителем maybehere07. Таким образом, если бы вы попытались catоткрыть файл .file2в первом случае, вы бы получили тот же результат, что и во втором случае. Но вы пытались catДРУГОЙ файл с именем -file2.

Кстати, -file2кажется двоичным файлом (изображение, звук, что-то еще ), поэтому вы получаете ту тарабарщину, которую видели.

4
28.01.2020, 02:13

На шаге 3 вы нашли файл с именем .file2, но на шаге 4а вы получили доступ к файлу с именем -file2. Это не совсем то же самое имя.

4
28.01.2020, 02:13

Теги

Похожие вопросы