Saturday, April 26, 2014

tail

  •   tail command example
Print the last 10 lines of a file by default.


$ tail filename.txt
Print N number of lines from the file named filename.txt
$ tail -n N filename.txt
View the content of the file in real time using tail -f. This is useful to view the log files, that keeps growing. The command can be terminated using CTRL-C.
$ tail -f log-file
 
 
 

Related Posts:

  • head   head command example Output the first part of files, prints the first part (10 lines by default) of each file. SYNTAX head [options]... [file]... Examples Extract the first 85 lines from a file… Read More
  • User Management in Linux This article will try to cover basics of Linux user management through command line tools. Linux provides 5 different alternatives to choose the accessibility. They are as listed below. Super User or … Read More
  • Vim Editor Commands Vim ?? What's that ??   Vim is an editor to create or edit a text file.   There are three modes in vim. Insert mode - Adding text Command mode - Modifying text Last line mode - Save & quit Inse… Read More
  • Group Management in Linux Group Management :   A user can be participated to more than one group at the same time. A user who is member of a group can change to that group without password but a user NOT member can … Read More
  • nslookup   nslookup Query Internet name servers Syntax: nslookup nslookup host-to-find nslookup server interactive mode: nslookup -server nslookup [-options] [host-to-find ] … Read More

0 comments:

Post a Comment