Contact us

Print

Using file

The file utility is used to determine file or directory types.

To use File


1. Change back to your home directory.
2. To see if "folder1" is a file or directory; type:


[root@localhost root]# file folder1

folder1: directory


3. Change to the folder1 directory

4. Use the file utility to determine the file type for temp_file11


root@localhost folder1# file temp_file11

temp_file11: empty


5. Use the file utility to find out the file type for all the files in the folder1 directory. List
here:


6. Change directory to the /etc directory.


[root@localhost folder1]# cd /etc


7. Use the file utility to find out the file type for the "passwd" file.


[root@localhost etc]# file passwd


What type of file is it?



Created by: system. Last Modification: Wednesday 26 of November, 2008 19:22:39 EST by wale.

...