180k views
25 votes
In a Linux machine, you have a file named "types_of_fish.txt" and you want to append the word "trout" to the file contents. Which of the following commands can you use?

A. echo trout < types_of_fish.txt
B. echo trout > types_of_fish.txt
C. echo trout >> types_of_fish.txt
D. echo trout 2> types_of_fish.txt

1 Answer

5 votes

Answer:

B because if you where to go in and try to make a file via terminal it would have to be like

$ echo file1 > file1

$ ln -s file1 file2

$ cat file2

file1

$ ls -ld file2

lrwxrwxrwx 1 lubos lubos 5 Jan 10 14:42 file2 -> file1

for the example

User Feob
by
3.6k points