1.Split larger files Using 7-zip
----------------------------------------------
# 7z a -v50m -mx0 ubuntu.7z /test/ubuntu.isoThis will create 50MB size files from the ubuntu.iso. The -v50m is the volume size(use k for kilobytes& g for gigabytes) etc; the -mx0 switch tells 7-Zip to use no compression, that is, just to split data into parts.
To extract just do
# 7z x ubuntu.7z.001
OR
# 7z e ubuntu.7z.001
2.Binary-Decimal Conversion
--------------------------------------------------
To Get the decimal value of Binary num 10000000
$echo "ibase=2; 10000000"|bc
To Get the Binary value of Decimal Num 254
$echo "obase=2; 254"|bc
3.To Redetect Network Card
---------------------------------------------Comment the acive network line in the files and reboot to redetect network card
/etc/udev/rules.d/70-persistent-net.rules
4.To configure wake-on-lan:
-----------------------------------------------
Install wakeonlan or ether-wake package
Install ethtool in remote system
#apt-get install ethtool
edit /etc/rc.local to add this line before the exit 0 line:
edit /etc/rc.local to add this line before the exit 0 line:
ethtool -s eth0 wol g
or execute # ethtool -s eth0 wol gFind out the MAC address of Remote Machine's network card (replace ethX with eth0/eth1, ..):
#ifconfig ethX | grep "HWaddr" | awk '{print $5}'
shutdown the Remote machine. Invoke the below mentioned command from ur System:
#wakeonlan RemoteSys_mac_id
--------------------------------------------------------------------------------
Create a file in /etc/udev/rules.d/ as follows to hide the drives “sda1,2 &7” as root user
# vi 99-hide-disks.rules
KERNEL=="sda1",ENV{UDISKS_PRESENTATION_HIDE}="1"
KERNEL=="sda2",ENV{UDISKS_PRESENTATION_HIDE}="1"
KERNEL=="sda7",ENV{UDISKS_PRESENTATION_HIDE}="1
6.Disable Password prompt for sudo commands
----------------------------------------------------------------------------
Edit the %sudo line in /etc/sudoers file as follows
# vi /etc/sudoers
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
7.VBOX Driver/VBoxGuestAddition innstallaton on Linux
-----------------------------------------------------------------------------------------------------
#yum install kernel-devel kernel-headers kernel-PAE-devel gcc SDL Qt gcc-c++
#yum install dkms --------> Optional Required for Host
#export KERN_DIR=/usr/src/kernels/2.6.33.3-85.fc13.i686.PAE/ ----> Optional
For Ubuntu
$ sudo apt-get install build-essential
mount VBOXGuest addition package... and run ./VBoxLinuxAddition.run
8.To add NTFS file system support
-----------------------------------------------------------------
Install "fuse" and "fuse-ntfs-3g" packages
-----------------------------------------------------------------
Install "fuse" and "fuse-ntfs-3g" packages
9.To display storage controllers and N/W Card in the system
#lshw -class disk -class storage
#lshw -class network
10.Force umount when the device is busy
----------------------------------------------------------------
# fuser -km /mnt/hda2
11.To find the installed package of a Command.
-------------------------------------------------------------
# which ls ----- To find the location of command
# rpm -qf /bin/ls
For Ubuntu
# dpkg -S /bin/ls
12.How to umount when the device/mounted directory is busy
----------------------------------------------------------------------------------------
# umount /storage
umount: /storage: device is busy
umount: /storage: device is busy
This error comes when some running services use this device/directory.So Find out the process ID of the services ,which using the device and kill them one by one ,use the fuser command
# fuser -m /storage or # fuser –m /dev/hdd3
/storage: 2110 2115 2116 2230 ---->Output of the above command..The find the running process using PID
# ps auxw grep 2110 (For Checking the name of process)
Finally Kill each process or stop associated services.
# kill -9 2110 2115 2116 2230
Now the device/directory will be able to umount