Saturday, July 27, 2013

LINUX-EXTRA-USEFULL-COMMAND

***********************************************************************                                            SYSTEM-INFO-COMMAND
                    ***********************************

*How to play a songs through command mode 

#yum install   cmus

#cmus 

- press no. '5' to select the songs dir. 
- press '+' to increase the volume .
- press '-' to decrease the volume. 
- press 'right arrow' to forward the song. 
- press 'left arrow' to rebind the song. 
& more option to play "cmus" command 

How to run Google Chrome as root.
Right click on the launch icon and select properties.  Append the following to the command in the 
#launcher --user-data-dir

This is what it will look like

/opt/google/chrome/google-chrome %U

just change it to be

/opt/google/chrome/google-chrome --user-data-dir %U

If you can’t find the launcher then you have to add it to panel or to your desktop. Select Applications-->Internet-->Google Chrome, right click on it and select Add this launcher to panel or Add this launcher to Desktop. Once you find the launcher icons, follow the steps above to run Chrome as a root user.
--------------------------------------------------------------------------------------------------------------------------
1. #cat    sl-60-x86_64-2011-live-DVD.iso   >>    /dev/sdb1  or /dev/cdrw   
 (To make a live booting  USB/CD/DVD from linux command mode )

2. #partprobe   /dev/sdb1   [so kernal can read this pendrive as bootable device] 
----------------------------------------------------------------------------------------------------------------------------- 

 Keyboard Shortcuts
*******************
Enter                    – Run the command
Up Arrow                 – Show the previous command
Ctrl + R                 – Allows you to type a part of the command you're looking for and finds it
Ctrl + Z                 – Stops the current command, resume with fg in the foreground or bg in the background
Ctrl + C                 – Halts the current command, cancel the current operation and/or start with a fresh new line
Ctrl + L                 – Clear the screen
command | less                 – Allows the scrolling of the bash command window using Shift + Up Arrow and Shift + Down Arrow
!!                     – Repeats the last command
command  !$                 – Repeats the last argument of the previous command
Esc + . (a period)             – Insert the last argument of the previous command on the fly, which enables you to edit it                           before executing the command
Ctrl + A                 – Return to the start of the command you're typing
Ctrl + E                 – Go to the end of the command you're typing
Ctrl + U                 – Cut everything before the cursor to a special clipboard, erases the whole line
Ctrl + K                – Cut everything after the cursor to a special clipboard
Ctrl + Y                 – Paste from the special clipboard that Ctrl + U and Ctrl + K save their data to
Ctrl + T                 – Swap the two characters before the cursor (you can actually use this to transport a                           character from the left to the right, try it!)
Ctrl + W                 – Delete the word / argument left of the cursor in the current line
Ctrl + D                 – Log out of current session, similar to exit
----------------------------------------------------------------------------------------

Learn the Commands
********************
apropos  subject            – List manual pages for subject
man  -k  keyword            – Display man pages containing keyword
man  command                    – Show the manual for command
man -t man | ps2pdf - > man.pdf      – Make a pdf of a manual page
which command                 – Show full path name of command
time command                 – See how long a command takes
whereis app                 – Show possible locations of app
which app                 – Show which app will be run by default; it shows the full path
--------------------------------------------------------------------------------------------------------
Searching
************
grep pattern files             – Search for pattern in files
grep -r pattern dir             – Search recursively for pattern in dir
command | grep pattern             – Search for pattern in the output of command
locate file                 – Find all instances of file
find / -name filename             – Starting with the root directory, look for the file called filename
find / -name ”*filename*”         – Starting with the root directory, look for the file containing the string filename
locate filename             – Find a file called filename using the locate command; this assumes you have already used the                           command updatedb (see next)
updatedb                 – Create or update the database of files on all file systems attached to the Linux root                       directory
which filename                 – Show the subdirectory containing the executable file  called filename
grep TextStringToFind /dir         – Starting with the directory called dir, look for and list all files containing TextStringToFind
---------------------------------------------------------------------------------------------------------
File Commands
***************
ls                     – Directory listing
ls -l                     – List files in current directory using long format
ls -laC                 – List all files in current directory in long format and display in columns
ls -F                     – List files in current directory and indicate the file type
ls -al                     – Formatted listing with hidden files
cd dir – Change directory to dir
cd – Change to home
mkdir dir – Create a directory dir
pwd – Show current directory
rm name – Remove a file or directory called name
rm -r dir – Delete directory dir
rm -f file – Force remove file
rm -rf dir – Force remove an entire directory dir and all it’s included files and subdirectories (use with extreme caution)
cp file1 file2                 – Copy file1 to file2
cp -r dir1 dir2             – Copy dir1 to dir2; create dir2 if it doesn't exist
cp file /home/dirname             – Copy the file called filename to the /home/dirname directory
mv file /home/dirname             – Move the file called filename to the /home/dirname directory
mv file1 file2                 – Rename or move file1 to file2; if file2 is an existing directory, moves file1 into directory file2
ln -s file link             – Create symbolic link link to file
touch file                 – Create or update file
cat > file – Places standard input into file
cat file                 – Display the file called file
more file                 – Display the file called file one page at a time, proceed to next page using the spacebar
head file                 – Output the first 10 lines of file
head -20 file                 – Display the first 20 lines of the file called file
tail file                 – Output the last 10 lines of file
tail -20 file                 – Display the last 20 lines of the file called file
tail -f file                 – Output the contents of file as it grows, starting with the last 10 lines
----------------------------------------------------------------------------------------------------------
Compression
**************
tar cf file.tar files             – Create a tar named file.tar containing files
tar xf file.tar             – Extract the files from file.tar
tar czf file.tar.gz files         – Create a tar with Gzip compression
tar xzf file.tar.gz             – Extract a tar using Gzip
tar cjf file.tar.bz2             – Create a tar with Bzip2 compression
tar xjf file.tar.bz2             – Extract a tar using Bzip2
gzip file                 – Compresses file and renames it to file.gz
gzip -d file.gz             – Decompresses file.gz back to file
-------------------------------------------------------------------------------------------
Printing
*************
/etc/rc.d/init.d/lpd start         – Start the print daemon
/etc/rc.d/init.d/lpd stop         – Stop the print daemon
/etc/rc.d/init.d/lpd status         – Display status of the print daemon
lpq                     – Display jobs in print queue
lprm                     – Remove jobs from queue
lpr                     – Print a file
lpc                     – Printer control tool
man subject | lpr             – Print the manual page called subject as plain text
man -t subject | lpr             – Print the manual page called subject as Postscript output
printtool                 – Start X printer setup interface
-----------------------------------------------------------------------------------------
Stopping & Starting
**********************
shutdown -h now         – Shutdown the system now and do not reboot
halt                 – Stop all processes - same as above
shutdown -r 5             – Shutdown the system in 5 minutes and reboot
shutdown -r now         – Shutdown the system now and reboot
reboot                 – Stop all processes and then reboot - same as above
startx                 – Start the X system
-----------------------------------------------------------------------------------------
ssh -p port user@host             – Connect to host on port port as user
ssh-copy-id user@host             – Add your key to host for user to enable a keyed or passwordless login
------------------------------------------------------------------------------------------
bg                 – Lists stopped or background jobs; resume a stopped job in the background
fg                 – Brings the most recent job to foreground
fg n                 – Brings job n to the foreground
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
*Note :- Mostly commands work under the these 'dir' - /bin
                              /bin/bash
                              /usr/bin
                              /sbin
                              /usr/sbin
                              /etc       
* on sudo this work like this - #sudo  /sbin/ifconfig


$locat   command name                       [ to find the location of the command like - /sbin/init , /sbin/adduser ]

$whereis command name                    [ to fined the location of the command and find  any file and dir from the system ]

$xclock                                                 [ to show gnome clock ]

$oclock                                                 [  " ]

$du -h                                                    [ find the used disk in GB ]

$df -h                                                     [ find the free space in hard disk ]

$du  -sh  name of file/dir                       [ to find the particular file/dir used space ]

$ls -m                                                    [ to find vertical width with sepretcomma,]

$ls -m -u                                                [ list info about mostly used file/dir ]                     
                                   
$umask -s                                              [ default permission of file/dir ]

$chage  -l user-name                            [ show account ageing info ]

$lsof                                                      [ list of open file  ]    

$rpcinfo                                                [ report RPC information ]

#iptables  -L -n -v                                 [ display the status of your firewall ]

$env                                                      [ display the environment of your system ]

$dmidecode                                          [ all about the BIOS]

$biosdecode                                          [ all about the BIOS ]

$chkconfig   --list  |less                         [ find the all running services ]

# mpstat 2 5                                         [ Report processors related statistics & to find out all the processing is runnig ]

$ps -avx                                                 [ runing process ]

$uptime                                                 [ find the total hour of system is up ]

$pwd                                                     [ to find out the location of the present currsor ]

$last                                                      [ show listing of last logged in users ]

$lastb                                                    [ show listing of last bad password used by other user ]

$lastlog                                                 [ reports the most recent login of all users or of a given user ]

$lastcomm                                            [ print out information about previously executed commands ]

$last  -d                                                 [ For non-local logins, Linux stores not only the host nameof the remote host but its IP number as well. This option
translates the IP number back into a hostname.]

$last   -a                                                [ Display the host-name in the last column. Useful in combination with the next flag.]

$last   -F                                                [ Print full login and logout times and dates.]

$last   -o                                                [ Read an old-type wtmp file (written by linux-libc5 appli-cations)    

$last   -w                                               [ Display full user and domain names in the output.]

$last   -x                                                [ Display  the  system  shutdown  entries  and  run   level ]

$arch                                                     [ to find out bit size of os ]

$uname -rmi                                          [  "]

$cat /etc/redhat-release                        [ to find out about OS ]

$ksnapshot                                            [ to take a snapshot ]

$lspci                                                     [ list of all PCI devices ]

$lspci  |grep  ethernet                           [ to find out the Ethernet devices ]

$ls -lZ                                                     [ to find out the SElinux context ]

#getenforce                                           [ show the selinux status ]

#setenforce   0                                      [ off selinux]

#serenforce   1                                      [ on the selinux]

#vim  /etc/sysconfig/selinux                   [ to change selinux value from the vim editor mode ]

#vim  /etc/selinux/conf

#getsebool  -a                                         [ get SELinux boolean value(s) ]

#getsebool  -a  |grep  samba

#setsebool                                              [ set SELinux boolean value  ]

#setsebool   -p     on    

#setsebool   -p     of                                [ we can also use 0 and 1 on the place of  'off' and 'on' ]

#vim  /etc/hosts.allow                            [ Make entry the name of host that should be allow to access and use our server     ]

ex. -  vsftpd: 192.168.1.0/24

    EXCEPT 192.168.1.2

    OR

    vsftpd : ALL  EXCEPT 192.168.1.2
   
    :wq  [ save the file ]


#vim  /etc/hosts.deny                              [ deny the users that should not use the service  ]

Ex. - sshd: all except 192.168.1.0/24  except  172.16.0.0/24

    :wq [ save the file ]


#set  |less                                                [ show all information of user ]

$press 'ctrl + m to use Enter key

$press 'ctrl + p to find the history

$fc -l                                                        [ to see the history

$sar                                                         [ Collect, report, or save system activity information ]

$sar  -n  dev  |more

$sar 4 5    

* Binary Marks
 --------------

Digits                     Permission

0                    none

1                    execute

2                    write

4                    read

3 (1 +2 )                 write and execute

5 (1 + 4 )                read and execute

7 (1 + 2 + 4 )                 read , write and execute
-----------------------
*USERS INFORMATIONS
--------------------
$cat  /etc/passwd                                   [ all users informations ]

$cat  /etc/shadow

$cat  /etc/gshadow

$cat  /etc/group
--------------------

#chage  -l   username                            [ change user password expiry information ]

#vi  /etc/sysconfig/selinux                     [  configure ther SElinux configuration]

#cd /var/log                                           [ to check the log file ]

#log] tail   messages                             [ to check the massages ]

#log] tail   secure                                  [ to check about the security log ]

#ls   -ltr                                                  [ to check all log file ]

#who -b                                                  [ show the dat and time of last system boot]

#who - u                                                 [ where  (.) means the user was active in the last minute , (old) means the user has been idle for more than 24 hours ]

#who -m                                                 [ show only hostname ]

#date  --date='15yers  ago'                   [ show the same day before 15 years ]

#setfont  /lib/kbd/consolefonts/iso02-12x22_press-tabe   [ to set the font of the console or command mode ]

#cat   OS.iso   >> /dev/sdb1                 [ To make a live booting from linux usb ]

#partprobe     /dev/sdb                         [ So kernal can read this pendrive ]

#startx                                                  [ To go from command mode to graphic ]

#last  username                                   [ To find last login by user ]

#set  |less                                             [ To show the all information about user ]

#!any-word                                          [ To find the history by that word ]
========================================================================

----------------------------------------------------------------------------------------------------------------------------------
vimtutor    (all editor - 'vi'  'vim'  'gvim' 'gedit' 'nano'  'emac' 'joc' 'cat' )
--------------------------------------------------------------------------------

            'VIM' Editor
        ..........................   

#vim  file-name

*press  'I' 'A' 'O' 'S' and 'P'  to go in to the insert mode ( to write some thing in the fiel )

*prss 'Esc' key to exit from the insert mod

*press ' :wq ' to save and quite from the file

*press ':q' to quit from the file

*press ':q!' to quit forceful

*press ':w' to save the file

*press ':w!' to save forcedly

*press ':wq!' to save and quit forcedly

*press 'd' to delete the line

*press '2dd' two line delete '3dd' three line delete

*press 'x' to delete the one by one

*press 'e' to end of the line and move right side

*press '0' to go to the first word of the line

*press 'y' from the word we want to copy [y - means yenky ] copy one line,

*press '2yy' copy to line . press '3yy' copy three line

*press 'p' to past the line

*press ':set nu' to set the all line in numbering.

*press ':set nonu' to set no numbering

*press ":! any command"  we can run any command while using 'VIM' run any command under the vieditor
        ----------------  

* To move the cursor, press the h,j,k,l keys as indicated. **
             ^
             k              Hint:  The h key is at the left and moves left.
       < h       l >               The l key is at the right and moves right.
             j                     The j key looks like a down arrow.
             v

*press 'dw' to delete a word

*press 'u' to undo the deleted line & press 'U' to undo whole line

*press 'Ctrl + r' to redo the command and word

*Type  ' r '  and then the character which should be there  ( to replace the word )

*Type "CTRL-G" to show your location in the file and the file status

*press 'gg' to go on the TOP of the page

*press 'Shift + g' to go on the BOTTOM of the page

*press "/word to find"  to find any word in the page

*press " :25 "  to go on the 25th line means find the sentence by the number

*To Replace the word  run this command :- " :%s/Rahul/Amit/g " means Rahul has been replaced by Amit. 

*To copy from the working file to a new file in vim editor use this command  ( :!cp  running-file-name   any-new-file-name )

#chattr  +i  file name          [ 'chatter' attribute is used to stop accidentally deletation of files and dir. we can not delete the files secured via
-------------------------          'chattr' now we can only read by option (+i) to remove the premission use (-i)

#chattr  -i  file name                           [ to remove the permission ]
-----------------------   

$grep  word-name   file/dir                 [ to find start from this word ]

$grep  -i word-name  file/dir               [ "]

$less   file-name                                  [ to view the file step by step press 'v' to      open the vieditor to change something ]


               
                        CAT-Editor
                    --------------------------


$cat  > ram                                     [ to create a new file  'cat > ram press enter and start to write after finished press 'Ctrl+D' to save the file ]

- - - -- -- - -
--- -----------
----------^D [ to save the fiel ]


$cat  ram  sam                                    [ to show the both file one time ]

$cat  ram  sam  > gopi                   [ to send the all content of 'ram' and 'sam' into the 'gopi' ]

$cat  ram                                            [ show the file ]

$cat >> ram                              [ to add some word and sentence in ram file ]

$cat -Et  ram  OR  $cat  -A  ram        [ to show the end of file ]

---------------------------------------------------------------------------------------------------------------------------------

  

Thursday, July 25, 2013

HOW TO INSTALL (.rar file) IN LINUX

How to Open, Extract and Create RAR Files in Linux

RAR is most popular tool for creating and extracting compressed archive (.rar) files. When we download a archive files from the web, we required a rar tool to extract them. RAR is available freely under Windows operating systems to handle compressed files, but unfortunately rar tool doesn’t pre-installed under Linux systems, we need to install it using third-party tools to open, extract, uncompress or unrar a archive files.
Install Unrar in Linux

Install Unrar in Linux
The guide explains how to install unrar and rar command-line tools using RPMforge repository under Linux systems with yum command with their practical examples.

Enable RPMForge Repository for RHEL/CentOS/Fedora

We must first install and enable RPMForge repository under Linux systems to install Unrar and Rar command-line applications. We have provided RPMForge repositories for RHEL/CentOS 6/5/4 distributions. By default RPMForge repository already shipped with Fedora 17-12 systems, So fedora user’s don’t need to install it again.
For RHEL/CentOS 6/5/4 – 32-Bit OS
## RHEL/CentOS 6 32-Bit ##
# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.i686.rpm

## RHEL/CentOS 5 32-Bit ##
# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.i386.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.i386.rpm
 
 
 For RHEL/CentOS 6/5/4 – 64-Bit OS
## RHEL/CentOS 6 64-Bit ##
# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

## RHEL/CentOS 5 64-Bit ##
# wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
# rpm -Uvh rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
Once you’ve enabled RPMforge repository for systems. Follow the below instillation instructions with their examples.

Step 1: How to Install Unrar in Linux

# yum install unrar
Sample Output
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Dependencies Resolved
=========================================================================================
 Package   Arch   Version    Repository   Size
=========================================================================================
Installing:
 unrar              i386            4.2.3-1.el5.rf      rpmforge   123 k

Transaction Summary
=========================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 123 k
Is this ok [y/N]: y
Downloading Packages:
unrar-4.2.3-1.el5.rf.i386.rpm                                 | 123 kB     00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : unrar                                                                                                                                            1/1

Installed:
  unrar.i386 0:4.2.3-1.el5.rf

Complete!

Step 2: How to Open/Extract a RAR File in Linux


To open/extract a RAR file in current working directory, just use the following command with unrar e option.

# unrar e tecmint.rar

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Extracting from tecmint.rar

Extracting  index.php                                                 OK
Extracting  index.html                                                OK
Extracting  xyz.txt                                                   OK
Extracting  abc.txt                                                   OK
All OK
To open/extract a RAR file in specific path or destination directory, just use the unrar e option, it will extract all the files in specified destination directory.

# unrar e tecmint.rar /home/

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Extracting from tecmint.rar

Extracting  /home/index.php                                           OK
Extracting  /home/index.html                                          OK
Extracting  /home/xyz.txt                                             OK
Extracting  /home/abc.txt                                             OK
All OK
 
To open/extract a RAR file with their original directory structure. just issue below command with unrar x option. It will extract according their folder structure see below output of the command.

# unrar x tecmint.rar

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Extracting from tecmint.rar

Creating    tecmint                                                   OK
Extracting  tecmint/index.php                                         OK
Extracting  tecmint/index.html                                        OK
Extracting  tecmint/xyz.txt                                           OK
Extracting  tecmint/abc.txt                                           OK
Creating    default                                                   OK
Extracting  default/index.php                                         OK
Extracting  default/index.html                                        OK
Creating    include                                                   OK
Extracting  include/abc.txt                                           OK
Creating    php                                                       OK
Extracting  php/xyz.txt                                               OK
All OK

Step 3: How to List a RAR File in Linux

 

To list a files inside a archive file use unrar l option. It will display the list of files with their sizes, date, time and permissions.

unrar l tecmint.rar

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Archive tecmint.rar

 Name             Size   Packed Ratio  Date   Time     Attr      CRC   Meth Ver
-------------------------------------------------------------------------------
 index.php           0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 index.html          0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 xyz.txt             0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 abc.txt             0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 index.php           0        8   0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.9
 index.html          0        8   0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.9
 abc.txt             0        8   0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.9
 xyz.txt             0        8   0% 18-08-12 19:22 -rw-r--r-- 00000000 m3b 2.9
-------------------------------------------------------------------------------
    8                0       64   0%

Step 4: How to Test a RAR File in Linux


To test an integrity of a archive file, use option unrar t. The below command will perform a complete integrity check for each file and displays the status of the file.

unrar t tecmint.rar

UNRAR 4.20 beta 3 freeware      Copyright (c) 1993-2012 Alexander Roshal

Testing archive tecmint.rar

Testing     tecmint/index.php                                         OK
Testing     tecmint/index.html                                        OK
Testing     tecmint/xyz.txt                                           OK
Testing     tecmint/abc.txt                                           OK
Testing     default/index.php                                         OK
Testing     default/index.html                                        OK
Testing     include/abc.txt                                           OK
Testing     php/xyz.txt                                               OK
All OK
The unrar command is used to extract, list or test archive files only. It has no any option for creating RAR files under Linux. So, here we need to install RAR command-line utility to create archive files.

Step 5: How to Install Rar in Linux


To install RAR command option in Linux, just execute following command.

yum install rar
Sample Output
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Dependencies Resolved
=========================================================================================
 Package   Arch   Version    Repository   Size
=========================================================================================
Installing:
 rar    i386            3.8.0-1.el5.rf      rpmforge   264 k

Transaction Summary
=========================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 264 k
Is this ok [y/N]: y
Downloading Packages:
rar-3.8.0-1.el5.rf.i386.rpm          | 264 kB     00:01
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : rar                                          1/1

Installed:
  rar.i386 0:3.8.0-1.el5.rf

Complete!

Step 6: How to Create Rar File in Linux


To create a archive(RAR) file in Linux, run the following command with rar a option. It will create archive file for a tecmint directory.

rar a tecmint.rar tecmint

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Evaluation copy. Please register.

Creating archive tecmint.rar

Adding    tecmint/index.php                                           OK
Adding    tecmint/index.html                                          OK
Adding    tecmint/xyz.txt                                             OK
Adding    tecmint/abc.txt                                             OK
Adding    tecmint                                                     OK
Done

 Step 7: How to Delete files from Archive


To delete a file from a archive file, run the command.

rar d filename.rar

Step 8: How to Recover Archives


To recover or fix a archive file or files, run the command with option rar r.
 
rar r filename.rar

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Building fixed.tecmint.rar
Scanning...
Data recovery record not found
Reconstructing tecmint.rar
Building rebuilt.tecmint.rar
Found  tecmint\index.php
Found  tecmint\index.html
Found  tecmint\xyz.txt
Found  tecmint\abc.txt
Found  tecmint
Done

Step 9: How to Update Archives


To update or add files to existing archive file, use the following command with option rar u.

rar u tecmint.rar tecmint.sql

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Evaluation copy. Please register.

Updating archive tecmint.rar

Adding    tecmint.sql                                                 OK
Done
Now, verify that the file tecmint.sql is added to archive file.

rar l tecmint.rar

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Archive tecmint.rar

 Name             Size   Packed Ratio  Date   Time     Attr      CRC   Meth Ver
-------------------------------------------------------------------------------
 index.php           0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 index.html          0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 xyz.txt             0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 abc.txt             0        8   0% 18-08-12 19:11 -rw-r--r-- 00000000 m3b 2.9
 tecmint             0        0   0% 18-08-12 19:23 drwxr-xr-x 00000000 m0  2.0
 tecmint.sql 0 8 0% 18-08-12 19:46 -rw-r--r-- 00000000 m3b 2.9
-------------------------------------------------------------------------------
    6                0       40   0%

Step 10: How to Set Password to Archives


This is very interesting feature from Rar tool, it allows us to set a password to archive file. To password protect archive file use option rar a -p.

rar a -p tecmint.rar

Enter password (will not be echoed):

Reenter password:

AR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Evaluation copy. Please register.

Updating archive tecmint.rar

Updating  tecmint.sql                                                 OK
Done
 
Now verify it by extracting the archive file and see whether it will prompt us to enter password that we have set above.

rar x tecmint.rar

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Extracting from tecmint.rar

Creating    tecmint                                                   OK
Extracting  tecmint/index.php                                         OK
Extracting  tecmint/index.html                                        OK
Extracting  tecmint/xyz.txt                                           OK
Extracting  tecmint/abc.txt                                           OK
Enter password (will not be echoed) for tecmint.sql:

Extracting  tecmint.sql                                               OK
All OK

Step 11: How to Lock Archives


Another interesting lock feature from rar tool, it provides a option to lock a particular archive file from extracting it.

rar k tecmint.rar

RAR 3.80   Copyright (c) 1993-2008 Alexander Roshal   16 Sep 2008
Shareware version         Type RAR -? for help

Processing archive tecmint.rar
Locking archive
Done

Conclusion


For mor RAR and Unrar options and usage, run the following command it will display a list of options with their description.
# man unrar
# man rar
We have presented almost all of the options above for rar and unrar commands with their examples. If you feel that we’ve missed anything in this list and you would like us to add, please update us using comment form below

Tuesday, July 16, 2013

LIST OF UPLOADED SEVER-CONFIGURATION

1. VSFTPD

2. DHCP

3. SAMBA

4.  NFS

5.  HTTPD

6. DNS

7. NAT

8. SUDO

9. YUM

10. SSHD

11. NIS

12. INCREASE THE  SWAP PARTITION 

Friday, July 12, 2013

Cyber Security Courses

(FIND ALL DETAIL FOR CCCS & CCCSP)

go to this url - http://elearn.cdachyd.in/eSikshak/help/English/eSikshak/cccs.htm

NE (NETWORK ESSENTIAL )

                                         NE ( Network Essential ) 

1) What is the network ?

:- When more than one pc are connected physically is called Network.

2) What is Networking ?

:- When more then one P.C are interconnected and accessing the data and service like file, accessing , printer accessing etc. is called as networkig.


                       Topic in this lessone
                 ====================

a) Explain the history of computer networks ( ARPANET )

b) Explain the need of networks. 

c) Explain the type of computer Network 

d) Explain the layers of open system interconnection (OSI ) mode