Linux Commands|tail-head-cat-echo-stat|Top 20 Linux commands|Linux commands For Devops 2020|
some basic commands how to create files and directories cat : ---------------------------------------------------- cat command allows us to create single or multiple files, view contain of file,concatenate files and redirect output in terminal or files concatenate files and redirect output in terminal or files. echo "hi" filename echo "end" filename "" =overide redirect the output on to the file ""=append the output onto the file ctrl+d head =is used for displaying the contents of the file from top to by default 10 lines head -n filename = n lines from top use tail : -------------------------------------------- tail is especially used to see log files of an application. tail filename = displays the bottom 10 lines of the file tail -n filename=display n lines from the bottom tail -10f filename = file stands for float on the file. display the flow of output from the file. file filename = shows the type of the file stat filename = gives statics about the file like name,size, blocks, created and modified.
Comments
Post a Comment