1 00:00:00,740 --> 00:00:08,720 ‫So a pipe is a form of redirection, and it sends the output of one command to another command for further 2 00:00:08,720 --> 00:00:09,560 ‫processing. 3 00:00:11,860 --> 00:00:18,760 ‫So Pipe is used to combine two or more commands, and in this the output of one command acts as the 4 00:00:18,760 --> 00:00:20,650 ‫input of another command. 5 00:00:21,130 --> 00:00:27,370 ‫And this commands output may act as an input to the next command and it can continue, believe me. 6 00:00:28,690 --> 00:00:32,890 ‫Now, pipes, it's important to note our uni directional, right? 7 00:00:32,920 --> 00:00:36,880 ‫In other words, data flows from left to right through the pipeline. 8 00:00:38,350 --> 00:00:40,630 ‫All right, so now, you know, all that, let's try it out. 9 00:00:43,500 --> 00:00:49,470 ‫Now in Cali, there is an important file that stores the actual password in encrypted format for the 10 00:00:49,470 --> 00:00:54,180 ‫user's account with additional properties related to the user password. 11 00:00:55,190 --> 00:00:57,660 ‫The name of this file is Shadow. 12 00:00:58,430 --> 00:01:01,040 ‫It's under the slash Etsy folder. 13 00:01:02,270 --> 00:01:06,230 ‫So why don't we dig in and have a look at the content of this file? 14 00:01:07,500 --> 00:01:10,170 ‫Oh, and of course, it requires root privileges. 15 00:01:10,500 --> 00:01:13,440 ‫So just add pseudo to the beginning of the command. 16 00:01:15,370 --> 00:01:19,870 ‫OK, so these are the encrypted form of the user's passwords. 17 00:01:21,270 --> 00:01:24,540 ‫Let's read the first three lines of this fire with the head command. 18 00:01:26,270 --> 00:01:29,720 ‫So we'll combine the two commands with the pipe redirection. 19 00:01:30,410 --> 00:01:34,850 ‫So the output of the one command acts as an input to another command. 20 00:01:34,880 --> 00:01:35,170 ‫Yeah. 21 00:01:36,330 --> 00:01:42,330 ‫OK, so now change the directory to the slash users slash bin folder. 22 00:01:43,950 --> 00:01:49,020 ‫Run L s dash l pipe grip my. 23 00:01:51,240 --> 00:01:59,070 ‫And the command takes the output of dollar sign less dash well as its input, the net effect of this 24 00:01:59,070 --> 00:02:06,660 ‫command is that the output of the less dash L is displayed one screen at a time. 25 00:02:07,590 --> 00:02:16,050 ‫So the pipe acts as a container, which takes the output of less dash l and gives it to the grip as 26 00:02:16,290 --> 00:02:16,890 ‫input.