Delete
Setting
Add New Item
Menu List
Title | Content Type | Order | Action | ||||||
---|---|---|---|---|---|---|---|---|---|
{{kb_content.name}} {{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
{{kb_content.name}} | {{setValue(content_types, kb_content.content_type)}} | {{kb_content.sort_order}} | Preview Edit Edit Content | ||||||
No record |
Find file location
You are new to Linux and switch to the Linux Operating System, this is a tutorial for you. This will help you to start your journey in the Linux system because when you perform daily operations in this system, you will not stack on it.
After installing the OS, we need some basic applications to do our daily operation such as browser, zoom, skype. If we are a developer then we need some development tools like Node.Js and NPM, PHP, phpMyAdmin, MySQL, Apache, Tomcat, DBreaver etc. This tutorial will cover all of this.
Important thing is when you enable the installation of those applications, you will learn many things regarding Linux OS.
Finding file location is common matter in Linux user. Find command use to find file location in Linux. The Linux find command is one of the most important and frequently used command command-line utility in Unix-like operating systems. The find command is used to search and locate the list of files and directories based on conditions you specify for files that match the arguments.
find command can be used in a variety of conditions like you can find files by permissions, users, groups, file types, date, size, and other possible criteria.
Finding by Name
The most obvious way of searching for files is by their name.
To find a file by name with the find command, you would use the following syntax:
find -name "query"
Finding by Type
You can specify the type of files you want to find with the -type parameter. It works like this:
find -type type_descriptor query
Here are some of the descriptors you can use to specify the type of file:
- f: regular file
- d: directory
- l: symbolic link
- c: character devices
- b: block devices
Filtering by Time and Size
find gives you a variety of ways to filter results by size and time.
Size
You can filter files by their size using the -size parameter. To do this, you must add a special suffix to the end of a numerical size value to indicate whether you’re counting the size in terms of bytes, megabytes, gigabytes, or another size. Here are some commonly used size suffixes:
- c: bytes
- k: kilobytes
- M: megabytes
- G: gigabytes
- b: 512-byte blocks
To illustrate, the following command will find every file in the /usr directory that is exactly 50 bytes:
find /usr -size 50c
Finding by Owner and Permissions
You can also search for files by the user or group that owns the file using the -user and -group parameters, respectively. To find every file in the /var directory that is owned by the syslog user run this command:
find /var -user syslog