Posted on : 19-10-2011 | By : admin | In : Tips
0
Archived; click post to view.
Excerpt: head With no options it shows the first ten lines of a text file. Use head −n x (where “x” is a number) to display the first x lines. Try head −F to use a continually updated version of head (if the file changes it will be reloaded and displayed), please note that using this option will run head is a continuous loop so you’ll need to use CTRL−C to exit. For example: head −n 20 somelog.txt Will display the top 20 entries of the file “somelog.txt”. tail With no options it shows the last ten lines of a file. Use tail −n x (where….
Posted on : 17-10-2011 | By : admin | In : Tips
1
Archived; click post to view.
Excerpt: There are various types of command execution methods available in both unix and linux and here are few of them which helps the administrators to run the commands with some rule-sets. logical AND Using && with commands If you want to execute the second command only if the first is successful. Use the following syntax. # command1 && command2 command2 will be executed if command1 successfully completes (if command1 fails command2 won’t be run). This is called a logical AND and mostly used during the source package installation (iee.. make && make install). logical OR using || If you want to execute the second command only….
Posted on : 17-10-2011 | By : admin | In : Tips
1
Archived; click post to view.
Excerpt: There are a few different ways to perform mass renaming of files in GNU/Linux (yes, mass renaming is possible!). There is also a perl script that renames the extentions on files. Below are three ways to perform mass renaming of files, using the commands mmv, rename (a perl script) or some bash shell scripting. Using MMV command mmv is a mass move/copy/renaming tool that uses standard wildcards to perform its functions.mmv’s manual page is quite difficult to understand, I have only a limited understanding of this tool. However mmv supports some standard wildcards. According to the manual the “;” wildcard is useful….