Discussion in 'Beginner Tutorials' started by Rob, Nov 3, 2011.
I think would be something like:
#echo "I want add this stuff to this file" >> Text.txt
>> will put stuff at the end of a file
Do not do a single >. It will basically overwrite the file.
Back to the topic, you could quickly view the result:
cat file1.txt file2.txt | less
That will allow me to read both files, one right after the other.
what's the work of 'less' here,as same thing is running without less?
The "less" command allows me to view the output with the ability to scroll through the output. Assume a file contains 500 lines of text. Using "cat file.txt" would only show the last few lines of text. So, how would someone scroll up to see the rest? This is when "less" is helpful.
"more" does the same thing, but "less" offers more features because less is more.
Separate names with a comma.