Additional commands

Additional commands

======================================================================
1> watch : it used to look refresh output of command. Refresh o/p defer 2 seconds.

eg. #watch free -m

======================================================================
2> Make the file size zero ( empty )
#echo > filename

======================================================================
3> generate fake logs
#logger “log message to generate”

Bydefault it goes to /var/log/messags

You can specify the log file name
#logger -f logfilename “log messge”

======================================================================
4> iok : graphical ( virtual ) keyboad
#iok

======================================================================
5> read certificate files (rct )

#rct cat-cert ca_bundle.crt

======================================================================
6> pdf to text conversion.
#pdftotext file.pdf

======================================================================
7> pdf to html conversion
#pdftohtml file.pdf

extra : we require to install this command packages.

======================================================================
8> Backup/ Restore of file system / partition.
#dump -ouf boot.dump /dev/vda1 Or /boot

o : full backup
u : update
f : file

Restore the dump backup

#restore -rf boot.dump

extra : need to install dump package and take backup of path where suffienct free space is available.

create hard disk backup
#dd if=/dev/sda of=/mnt/sdabackup

======================================================================
9> Playing with ISO image and CD drive.

create .iso file from cd
#dd if=/dev/cdrom of=/mnt/rhel.iso
Or
#dd if=/dev/sr0 of=/mnt/rhel.iso

i : input file
o : output file

create hard disk backup
#dd if=/dev/sda of=/mnt/sdabackup

create iso file system of folder.
#mkisofs -o /mnt/myiso.iso foldername

Burn File / iso image to CD
#cdrecord -v dev=/dev/cdrom file.iso

[ note : put blank CD in CD tray ]

eject CD tray
#eject

insert CD tray
#eject –

======================================================================

Posted in commands

Leave a Reply