Finding files and directories

Often, we are searching for files and directories from the GUI. We can also perform searches in the shell. First, we can use the find command; let's look for files that have a .conf extension. The search function would be as follows:

[philip@localhost ~]$ find /etc -iname "*.cfg"find: ‘/etc/grub.d': Permission deniedfind: ‘/etc/cups/ssl': Permission denied/etc/libblockdev/conf.d/00-default.cfgfind: ‘/etc/audit': Permission deniedfind: ‘/etc/dhcp': Permission deniedfind: ‘/etc/sssd': Permission denied/etc/grub2.cfgfind: ‘/etc/audisp': Permission deniedfind: ‘/etc/polkit-1/rules.d': Permission deniedfind: ‘/etc/polkit-1/localauthority': Permission deniedfind: ‘/etc/openvpn/server': Permission deniedfind: ‘/etc/openvpn/client': ...

Get CompTIA Linux+ Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.