Friday, July 1, 2016

Five Linux Cool Tricks

Five Linux Cool Tricks

Five Linux Cool Tricks (for fun)

1. Download a website:
Here is a simple way to download a whole website without actually visiting all the pages. First up all go into the directory you wish to download the whole website using the command line and type in the following

wget-r-p-k-E http://www.example.com/dir/

Note -E is to create .html extensions to XHTML or text files. Omit if not needed.It is however not possible for all type of sites

2. Five ways to logout from bash
1.logout
2.exit
3.CTRL+d
4.export TMOUT=1
5 kill -9 $
Don't use the fifth one when you are the root since it will kill some essential processes.

3. To change the root password:
The first step is to reboot the system. When grub loads up, move the arrow key up/down to highlight and select the Linux kernel and press e to edit the GRUB commands before booting. Next, move the arrow key up/down and select the Linux kernel and press e again. Give a single space and then type the word ‘single’ at the end of the line. Hit ENTER key. Then press b to boot up with the single keyword, which will boot Linux into single user maintenance mode. Now you will get a command prompt ready to accept your commands.Voila!!!! you are done. Now just enter the ‘passwd’ comand to reset your password (without prompting for the older one). Reboot and you are now the ROOT.However this is not working in all linux distros.

4. Play videos in RAR file without extracting:
Just type in command line
unrar p -inul /path/to/movie_folder/movie.name.r00 | vlc -
Video will start playing from your vlc player in just a few seconds. You can use other players instead of VLC if you wish.

5. Text based browsing:
You may use elinks or links in text mode to browse websites from a console. Here’s how to get started 
elinks http://www.google.com/
This will open up our site in your browser. haven't tried anyone of them..!
-->