Thursday, November 17, 2016
Creating a disk image and mount it using linux
#Using dd commands
dd if=/dev/zero of=dsk.img bs=100M count=1
#make terminal to super user privileges
sudo su
#attaching a virtual device
losetup /dev/loop1 dsk.img
#making the file structure
mkfs -t vfat /dev/loop1
#making a folder to mount
mkdir /mnt/f1
#mounting the image
mount -t vfat /dev/loop1 /mnt/f1/
#open nano editor
nano /mnt/f1/abc.txt
#unmount device
unmount /mnt/f1
#search using grep. if text saved in the device it'll print matches
grep "SCS2016" dsk.img
Sunday, October 2, 2016
My Blogger: Static Variables in Java
My Blogger: Static Variables in Java: Static Variables , class එකකින් හදන සෑම instance එකකටම පොදුයි.එහෙමත් නැත්නම් එකම class එකකින් හදන objects සියල්ල share කරන්නෙ static vari...
Subscribe to:
Posts (Atom)