Shutdown Timer…

To Shutdown Linux after a certain amount of time use command –

shutdown -h + <time in minutes>

example: shutdown -h + 5

And suddenly if u decide to cancel ur deed then just use –

shutdown -c

Posted by: rishabh_kalra | Comments (0)
Image to Ascii

Ever wondered how people make Such wonderful figures out of various ASCII characters ( like ! , @ etc.)??

Well the process is not as tedious as it seems to be. Don’t worry you don’t have to waste your brain think when character to use when. Simply use LINUX and a command in it.

The command “asciiview” converts an image to ASCII character sequence.

usage:

asciiview path_to_image_file

example:

asciiview /root/1.jpg

After you get the ASCII image in a new window press “s” to save it and if that doesn’t work simply take screenshot.

Posted by: rishabh_kalra | Comments (2)
Mounting iso image in Linux…

If u want to use a CD or DVD image (*.iso files) then u wont need an additional software in linux as on windows you just need to mount that image file to some directory, which can be done simply by executing the following command –>

mount -t iso9660 path_to_iso.iso path_to_mount_directory -o loop

example –>

mount -t iso9660 /tmp/game.iso /root/game -o loop

Here ->

1.mount is the command.

2.”-t” is option for specifying file system type.

3. “iso9660″ is the file system type for iso image.

4. “/tmp/game.iso” isthe path for the iso file to be mounted.

5. “/root/game” is the directory where the iso file has to be mounted.

Posted by: rishabh_kalra | Comments (0)
Copying Files On network

scp copies files between hosts on a network.  It uses ssh for data transfer, and uses the same authentication and provides the same security as ssh. Unlike rcp, scp will ask for passwords or  passphrases if they are needed for authentication.

It can be useful for automated transferring of files using coding.The prompt for password can be bypassed by generating authenticated public and private keys using command “ssh-keygen” and after that “scp” can be simply called using the “system” function in c++ etc. and automated file transfer can take place.

example syntax :–

scp user@host1:source_file_path user@host2:destination_file_path

example :–

scp /root/send.txt root@172.16.11.22:/root/received.txt

using this the file send.txt in the local machine will be copied and renamed as received.txt to /root directory of machine 172.16.11.22 and the connection to machine 172.16.11.22 will be made as user root on that machine ( ofcourse password will be asked unless a public private key relation is mentained between both machines).

Posted by: rishabh_kalra | Comments (0)