сравнить 2 файла csv и вывести только разницу в переменную

Do other network functions work?  Try to telnet from one machine to the other.  If you can successfully connect as root, and not as non-root, you have a problem.  Even if you get "Connection refused" (or something similar) as root and "Permission denied" (or something similar) as non-root, you have a problem.

TL;DR

If other network functions work as non-root, you probably don't really have a problem.  The ping program uses the ICMP protocol, whose use is restricted to root.  Therefore, the ping program is usually installed setuid to root.  Do

ls -ld $(which root)

If it's not owned by root and setuid (---s--x--x at least), make it so by executing

chown root path_to_ping
chmod 4755 path_to_ping

as root.

0
09.03.2018, 20:45
1 ответ

diff— это, вероятно, инструмент, который вам нужен. Вот три примера файлов:

$ paste foo bar baz
aaa aaa aaa
aaa aaa aaz
aaa aaa aaa
$ if diff <(sort foo) <(sort bar); then echo "No differences"; fi
No differences
$ if diff <(sort foo) <(sort baz); then echo "No differences"; fi
3c3
< aaa
---
> aaz
1
28.01.2020, 02:43

Теги

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