Posts

Showing posts from February, 2017

Creating Junk File in Unix

How to create Junk file in Unix Generally Junk files are created for testing the application developed and so on. Here I have show four methods to create Junk files in Unix: Method 1: using dd   dd if = /dev/zero of = filename.txt count = 1024 bs = 1024 bs--> Block Size. [1024 *1024 = 1MB file will be created] (or) dd if = /dev/zero of = filename.txt count = 1M bs = 1024  (1MB *1024=1GB file will be created) dd essentially copy that force to write every block of data (data will be unreadable but return 0) Method 2:  using  truncate truncate –S 10G file.txt It create a “sparse file” that cheats the file system and says that its has 10GB of data ,in other words it create a virtual data.This is fastest method for creating junk file. Method 3:  using  fallocate  fallocate –L 10 G file.txt It will allocate a 10 GB in memory in disk (not sparse file) but we will not have to worry about the data, which means anything could be there. Method 4: us

How to Create Folder Lock in windows

Create Your Own Folder Lock Step  1: Go to the folder where you wanna create a Your Own Folder Lock Step 2: Open a notepad and copy the given Code cls @ ECHO OFF title Folder Personal if EXIST "HTG Locker" goto UNLOCK if NOT EXIST Personal goto MDLOCKER :CONFIRM echo Enabling Lock ::Waiting for Conformation (y/n) set /p "cho=>" if %cho% == Y goto LOCK if %cho% == y goto LOCK if %cho% == n goto END if %cho% == N goto END echo Invalid choice . goto CONFIRM :LOCK ren Private "HTG Locker" attrib +h +s "HTG Locker" echo Folder locked goto End :UNLOCK echo Enter password to unlock folder set /p "pass=>" if NOT %pass% == mypassword goto FAIL attrib -h -s "HTG Locker" ren "HTG Locker" Personal echo ERR_INCORRECT_PASSWORD ::FOLDER UNLOCK FAILED goto End :FAIL echo Invalid password goto end :MDLOCKER md Personal echo Fo