So I have this bit:
systemctl list-unit-files | grep --ignore-case networkmanager | grep --ignore-case service | cut --fields=1 --delimiter=" "
Which gives as output:
NetworkManager-dispatcher.service
NetworkManager-wait-online.service
NetworkManager.service
And I have this bit:
find / -name NetworkManager-dispatcher.service 2>/dev/null
with the following output:
/usr/lib/systemd/system/NetworkManager-dispatcher.service
However,
find / -name $(systemctl list-unit-files | grep --ignore-case networkmanager | grep --ignore-case service | cut --fields=1 --delimiter=" ") -print 2>/dev/null
gives nothing whereas:
locate $(systemctl list-unit-files | grep --ignore-case networkmanager | grep --ignore-case service | cut --fields=1 --delimiter=" ")
shows:
/etc/systemd/system/multi-user.target.wants/NetworkManager.service
/etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service
/usr/lib/systemd/system/NetworkManager-dispatcher.service
/usr/lib/systemd/system/NetworkManager-wait-online.service
/usr/lib/systemd/system/NetworkManager.service
/usr/lib/systemd/system/NetworkManager.service.d
/usr/lib/systemd/system/NetworkManager.service.d/NetworkManager-ovs.conf
Why oh why doesn't find
find anything??? ;-)
Before you ask "Why don't you use locate then?", the answer to that is: I'm on Manjaro and locate
is not standard whereas find
is...
systemctl -t service -p FragmentPath show 'Network*'
orsystemctl -t service cat 'Network*'
– guest Feb 24 '20 at 13:20