Sunday, April 27, 2014

vim

  •   vim command examples
    
Go to the 143rd line of file

$ vim +143 filename.txt
Go to the first match of the specified
$ vim +/search-term filename.txt
Open the file in read only mode.
$ vim -R /etc/passwd
 
 
 
 

Related Posts:

  • 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… Read More
  • su su command examples Switch to a different user account using su command. Super user can switch to any other user without entering their password. $ su - USERNAME Execute a single command from a different ac… Read More
  • unzip unzip command examples To extract a *.zip compressed file: $ unzip test.zip View the contents of *.zip file (Without unzipping it): $ unzip -l jasper.zip Archive:  jasper.zip   Length  &… Read More
  • top   top command examples top command displays the top processes in the system ( by default sorted by cpu usage ). To sort top output by any column, Press O (upper-case O) , which will display all the possible columns… Read More
  • tar   tar command examples   Create a new tar archive. $ tar cvf archive_name.tar dirname/ Extract from an existing tar archive. $ tar xvf archive_name.tar View an existing tar archive. $ tar t… Read More

0 comments:

Post a Comment