Friday, March 1, 2013

Easy learn linux command line- Part 15

what are commands for view and change files?
you can read this section and learn how to use command line for work with files in linux. you dont forget "any things are files in linux".


Command Description
# cat file1 view the contents of a file starting from the first row   
# head -2 file1 view first two lines of a file   
# less file1 similar to 'more' command but which allows backward movement in the file as well as forward movement   
# more file1 view content of a file along   
# tac file1 view the contents of a file starting from the last line   
# tail -2 file1 view last two lines of a file   
# tail -f /var/log/messages view in real time what is added to a file   

No comments: