July 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

July 2014
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

DD command

* Example use of dd command to create an ISO disk image from a CD-ROM: dd if=/dev/cdrom of=/home/sam/myCD.iso bs=2048 conv=sync

*Using dd to wipe an entire disk with random data: dd if=/dev/urandom of=/dev/hda

*Using dd to clone a hard disk to another hard disk: dd if=/dev/ad0 of=/dev/ad1 bs=1M conv=noerror

*Duplicate a disk partition as a […]

LINUX COMPLETE GUIDE WITH SHELL TIPS

SYSTEM

Hardware | Statistics | Users | Limits | Runlevels | root password | Compile kernel | Repair grub | Misc

Running kernel and system information # uname -a # Get the kernel version (and BSD version) # lsb_release -a # Full release info of any LSB distribution # cat /etc/SuSE-release # Get SuSE version […]

Windows 2012 Command

taskmgr regedit timedate.cpl intl.cpl sconfig.cmd

get-process

diskpart

Install DHCP SERVER Using PowerShell

PS C:\Users\Administrator> get-command -Module servermanager

CommandType Name ModuleName ———– —- ———- Alias Add-WindowsFeature ServerManager Alias Remove-WindowsFeature ServerManager Function Disable-ServerManagerStandardUserRemoting ServerManager Function Enable-ServerManagerStandardUserRemoting ServerManager Cmdlet Get-WindowsFeature ServerManager Cmdlet Install-WindowsFeature ServerManager Cmdlet Uninstall-WindowsFeature ServerManager

PS C:\Users\Administrator> Add-WindowsFeature -IncludeAllSubFeature -Name DHCP, RSAT-DHCP

Success Restart Needed […]

if condition to check file or directory exists

-e: Returns true value, if file exists

-f: Return true value, if file exists and regular file

-r: Return true value, if file exists and is readable

-w: Return true value, if file exists and is writable

-x: Return true value, if file exists and is executable

-d: Return true value, if exists and is […]

check process is running or not shell

!/bin/bash CHECK=$0 SERVICE=$1 DATE=`date` OUTPUT=$(ps aux | grep -v grep | grep -v $CHECK |grep $1) echo $OUTPUT if [ “${#OUTPUT}” -gt 0 ] ; then echo “$DATE: $SERVICE service running, everything is fine” else echo “$DATE: $SERVICE is not running” fi

#!/bin/bash ps axho comm| grep $1 > /dev/null result=$? echo “exit code: ${result}” […]