Monday, 23 July 2012

Using tar commands in Linux


tar =  this command is used to create a archive / backup / a bundle of any file or a dir.We can create a tar file of any file or dir.  The command is


(i)         tar cvf  file1.tar  testdir

                              OR

                 #  tar  cvf  /dev/st0  testdir  (  we can create a tar archive in a device also ).

  

  Note :---- “  .tar  “ extension is not compulsory .
 
     c = create a new archive.

    v = produces verbose message.

  f =  file1.tar (  archive name ) is name of new file.




(ii)  tar tvf file1.tar

   
  (  This command is used to see the original file name or dir name and  path of tar archive or tar file ).


(ii)       tar xvf  file1.tar
  
(  This command is used to untar a tar file ).

Thursday, 19 July 2012

Using scp command copy a file or dir


If you need to copy a file or a directory you can use the scp command from the machine where the

data is available. you can check out below examples....


#     scp  file1 192.168.1.10:/root/

                      (  This will copy  file1 ( source )  to remote host = 192.168.1.10  ( Destination )  in

specified location  i.e. the root path ).




#    scp  -r  xdir  192.168.1.10: /
              
  (  The ‘  -r   is used  to copy the dir. i.e.  Recursion ).


  

#   scp  -p  file1  192.168.1.10: /

       (  The ‘ –p ‘  is used for preserving original  times  and  permissions but please note that it can

not preserve original ownership and groupmembership ).

Monday, 16 July 2012

Using Xmanager - Xstart

Xstart in Xmanager:
For a Linux machine use the below command in xstart to get the display
/usr/bin/xterm -ls -display $DISPLAY
For a Unix machineuse the below command in xstart to get the display
/usr/openwin/bin/xterm -ls -display $DISPLAY

Monday, 9 July 2012

To turn OFF or turn ON the Hibernate Option in Windows


To DISABLE hibernate option in Windows 7 OS, please open a command prompt window in the administrators login and type the below command:

powercfg -h off


To ENABLE hibernate option in Windows 7 OS, please open a command prompt window in the administrators login and type the below command:

powercfg -h on

Friday, 6 July 2012

To check the Physical RAM size in a Linux server


Top command: using top command you will get complete information.
free –m  - This gives Physical memory (RAM) size in Megabytes
free –k - This gives Physical memory (RAM) size in Kilobytes
cat /proc/meminfo - This also gives Physical memory (RAM) size in Kilobytes

Wednesday, 4 July 2012

Enabling/Disabling Firewall in Linux:
To enable the firewall in Linux OS first check the status by below command
service iptables status
For Enabling:
service iptables start
For Disabling:
service iptables stop

Next use below command to check the firewall config
chkconfig --list iptables
It should give the output as shown below if firewall is stopped
iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off

If you want to turn ON 345 segments then need to run

chkconfig iptables on 345

Monday, 2 July 2012

Arachni Application Installation and management


Download the arachni (tar.gz) desired version and just extract it to the opt directory

Login as root

go to the below path

/opt/arachni/arachni-v0.4.0.2-cde

Next run the below commands

nohup ./arachni_rpcd &

nohup ./arachni_web &
Using nohup will generate a output file so that you can later check the log details.

Sunday, 1 July 2012

To repair the Internet Explorer with a command

Open up a command prompt in administrator mode and type in below command....

sfc /scannow

How to disable the beep sound in CPU’s



Go into Device Manager, click View then Show Hidden Devices, then expand Non-plug and play Drivers,

double-click Beep, Driver Tab, and click the Stop button