find limit output to file

Frank Murphy frankly3d at gmail.com
Thu Feb 13 12:13:27 UTC 2014


If I run:
 find /usr/lib/systemd /etc/systemd -name '*.service' > service-files

How can I limit output to just foo.service, not full paths.

So I can then run
yum whatprovides $(cat service-files) | rpm -qf "%{NAME}\n" >
systemctl-list

which ^^^ is currently giving a broken pipe.

# I'll do a uniq bit between both lists.
___
Regards
Frank 
frankly3d.com


More information about the users mailing list