From there, it deletes log files older that older than 30 days. Let's say we want to create a script that moves log files older than 7 days to a backup path. We can combine find with rm or mv to create meaningful bash scripts that can be automated. -name is the name of the file type that you want to search.ĪDVERTISEMENT Practical examples of find with bash scripts.
#Find any file unixx drivers#
Drivers communicate with block devices by sending and receiving entire blocks of data.
![find any file unixx find any file unixx](https://i.pinimg.com/originals/bf/60/8e/bf608ed55f41416abe23e6ee9fe79b6d.png)
Files that are used to access block devices are called block device files. Examples include keyboards, sound cards and mouse.ī – Block devices. Drivers communicate with character devices by sending and receiving single characters (bytes, octets). Files that are used to access character devices are called character device files. Symbolic links point to files and are similar to shortcuts.Ĭ – Character devices.
![find any file unixx find any file unixx](https://www.cyberciti.biz/media/new/faq/2007/08/unix-df-du-outputs.jpg)
These are the folders under consideration. They can be any of the below:į – Regular file such as text files, images and hidden files.ĭ – Directory.
![find any file unixx find any file unixx](https://i.ytimg.com/vi/aFoYXdNNJpg/maxresdefault.jpg)
The find command lets you efficiently search for files, folders, and character and block devices.īelow is the basic syntax of the find command: find /path/ -type f -name file-to-search In this article, we will discuss the find command with some examples. There is a powerful command in Linux that helps you search for files and folders called find. But in certain environments like GUI-less servers, you need to search for files using the command line. Searching for files is relatively easy when you are using a GUI.