Distributed Networks Home
DBWebApplications eWebProgrammer
prev prev
  Course navigation
   
The find command
Common file types
In UNIX, files are divided into categories called types. The most common available file types are:
  1. f : regular files
  2. d : directory files
Type f files contain a program or text and are created with an editor such as vi or a compiler such as cc. The file named “letter” in your shell account is an example of a regular file. If you use the ls –1 command to show a full listing of the file named “letter,” you will see a dash as the very first character of the output.
The dash indicates this is a regular file as shown in the example below:

When searching for a regular file using the find command, use the –type f option.
Type d files are directories, which are folders that contain other files. The course-project file in your shell account is an example of a directory file. Use the –ld option with the ls command to show a full listing of the course-project directory file. A d is the very first character of the output, which indicates that this is a directory file, as shown in the examples below:
When searching for a directory file using the find command, use the –type d option.
  Course navigation