Categories
Linux

Linux And Unix Command To View File

View a text file called foo.txt on a Linux or Unix-like systems

Open the Terminal application and type the following command to view a text file called foo.txt using cat command:
cat foo.txt
OR
cat /etc/resolv.conf
Sample outputs:

nameserver 101.1.2.3
nameserver 102.2.3.4

You can also use more or less command as follows:

less filename
more filename-here