Saturday, September 10, 2011

Linux common commands


Show all file in Linux
[root@local hostname]# ll or ls
How to copy
[root@local host]# cp   dir 1/file name   dir 2
How to move file
[root@local host]# mv   dir1/file name dir2
To create five directory at a one time
[root@local host]# mkdir   naman {1, 2, 3,4,5}
Remove all directories
[root@local host]# rm  -rf    naman*
One name provide for all directory
[root@local host]# mkdir naman [1,5]
Create a three directory at a one time
[root@local host]#mkdir kamal {abc, bb, cc}

Remove all directories

[root@local host]# rm -rf  kamal*[a,b,c]
 To delete the directory which has any single last character?
[root@local host]# rm  -rf   kamal*[last char]

How make directory in Linux


How make directory in Linux
[root@local host]# mkdir     kamal
[root@local host]# cd   kamal
[root@local host kamal]# vi   hcl

How to make Files in Linux


How to make Files in Linux
We make three types of file in Linux
[root@local host]# vi   file name      (These file save: wq!)
[root@local host]# cat  > file name   (These file save ctrl+c)
[root@local host]# touch file name    (This is a MTE file)

Thursday, September 8, 2011

How to break Grub password


How to break Grub password
[root@local host]# vi  /etc/grub.conf
Press i key
Then delete these line            #1$$54$77#66$$   
              
Press escape key
: wq!

How to create Password in Grub


We can put the password at the installation time but if we want to put the password in Grub we can put it by the command
[root@local host]# grub-md5-crypt (Enter)
Password *****
Retype *****
#1$$54$77#66$$    (copy this line)
[root@local host]# VI   /etc/grub.conf
Press i key
Move the cursor
Hidden menu
Password   --md5     (paste line)
Press escape key
: wq!