|
|
RHCE vi editor switches options descriptions |
| Home | Workgroup | N+ | CCNA | IPv6 | RHCE | Interview | Tips n Tricks | Hardware | Troubleshooting |
| Basic | Wireless | Security | |||||||
RHCE vi editor switches options descriptionsIn our last assignment your learnt about cat command. cat is a very basic command you cannot depend on cat command in exam to create files as cat is a very essential command. In cat you can neither see the matter of file nor modify the material. In this assignment we are going to use world's most powerful editor vi. Before we go further just learn how to create a hidden file in linux and see it. $cat > [.name of file] A single dot in front of the file will make it hidden. For example to make a file named secret to hidden use this command $cat > .secret This is a secret file Now normal ls command will not list this file. Do a ls form current directory $ls As you can see in output .secret file is not shown here. But can see hidden file with –a switch. $ls –a .secret Now rename and make it unhidden. Use mv command to rename the file $mv .secret test $ls test
If we want to change the matter of file cat will not do it for us. So we will use vi editor to change matter of file. $vi test This will open a window with bilking cursor. vi editor work in three different mode. Esc Command mode [press Esc key before giving any command] Insert Insert mode [ to start editing use press Insert key ] Exit Exit mode [ Exit mode can be access via press Ecs key and :] Beside it there are various command which can be used to control the behavior of vi editor, some of them most command are there to remember Esc +:+w+q save and exit form file Esc+:+q+! exit without saving Esc+:+set nu to show hidden line Esc+:+/test to find test word in forward directions Esc+:+21 to move cursor in line number 21 Esc+:+2+yy to copy 2 line form cursor Esc+:+p to paste the copied line below the crusor Esc+:+dd to remove the entire line Esc+:+4+dd to remove 4 line below of cursor Esc+:+x to remove single character Esc+:+e to go to end of the word Esc+:+h to go one character back We have written a complete article about Vi editor. You can read it for more information about vi editor. |
RHCE Study guide home
Paper Code Cast Durations List of Exam topics Structure Of Filesystem Login in to Linux Terminals vi editor switches basic vi advance descriptions System admin Commands cat cp mv rm mkdir pwd help wc spell aspell tty who head tail man info help cat bzip gzip pwd cd mkdir du df find history which whereis ps top pstree uname shadow,passwd, group files chkconfig ntsysv Tools User Managements useradd userdel groupadd groupdel su sudo user profile files from /etc/skel Manage file permission chown chgrp chmod command description chmod command example sticky bit access control list setfacl getfacl chattr remove root password login problem and solution RedHat Package Manager how to secure terminal fstab file and error Removing grub password Disk managements simple partitions LVM logical volume manger Example disk quota managements Raid partition Swap partition lan card driver, Network configuration files commands ip ifconfig ping netstat arp mii-tool Linux as a router , create virtual LAN card Deny icmp ping request increase virtual terminal, Set default id, Disable alt ctrl delete key Network configurations job scheduling with at commands cron commands Configure telnet server configure ssh server configure ftp server Configure syslog server configure nis server configure nfs server configure dhcp server configure web server configure samba server configure vnc server configure printer server configure dns server configure dns slave server configure squid server configure sendmail server configure yum server network installation via ftp and nfs server via apache server |
|
|
|
|