Presentation is loading. Please wait.

Presentation is loading. Please wait.

Isecur1ty training center Presented by : Eng. Mohammad Khreesha.

Similar presentations


Presentation on theme: "Isecur1ty training center Presented by : Eng. Mohammad Khreesha."— Presentation transcript:

1 isecur1ty training center Presented by : Eng. Mohammad Khreesha

2  Introduction  head  tail  cat  tac  more and less  strings

3  In this lesson we will look at the contents of text files with head, tail, cat, tac, more, less and strings.

4  You can use head to display the first ten lines of a file.  head /etc/passwd  The head command can also display the first n lines of a file.  head -4 /etc/passwd  Head can also display the first n bytes.  head -c4 /etc/passwd

5  Similar to head, the tail command will display the last ten lines of a file.  tail /etc/services  You can give tail the number of lines you want to see.  Tail -3 /etc/services

6  The cat command is one of the most universal tools. All it does is copy standard input to standard output.  cat /etc/resolv.conf  cat is short for concatenate. One of the basic uses of cat is to concatenate files into a bigger file.  cat part1 part2 part3  You can use cat to create flat text files.  cat > outfile.txt  cat can be used to copy files  cat file1.txt > file2.txt

7  The purpose of tac is the opposite of cat.  Example :  cat /etc/passwd  tac /etc/passwd

8  The more command is useful for displaying files that take up more than one screen.  More will allow you to see the contents of the file page by page. Use the space bar to see the next page, or q to quit.  Some people prefer the less command to more.

9  With the strings command you can display readable ascii strings found in (binary) files.  strings is mainly useful for determining the contents of non-text files.  Example:  strings /bin/ls

10 The End


Download ppt "Isecur1ty training center Presented by : Eng. Mohammad Khreesha."

Similar presentations


Ads by Google