Home arrow Aaj Ka Tip
Main Menu
Help Docs
Gnu/Linux Distros
Aaj Ka Tip
Aaj Ka Command
Free Software

Aaj Ka Tip
Recover/Reinstall grub bootloader Print E-mail
To recover the boot loader for Ubuntu Linux or any other linux after the boot loader has been erased due to a dual windows installation or some other reason.

We need a bootable CD or USB to boot into a Linux shell.
Once looged in a Linux shell on the same machine, these steps are to be followed.

1. mount the / (root) partition of the Linux installation for which the grub boot loader has to be resintalled.

2. chroot into the Linux environment

3. run grub-installation

Download all files in a directory using WGET Print E-mail
To download all files in the directory using WGET in Linux, the following command can be used

wget -H -r --level=1 -k -p http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/

-r, –recursive
Specify recursive download.
-l, –level=NUMBER
Maximum recursion depth (inf or 0 for infinite).
-k, –convert-links
Make links in downloaded HTML point to local files.
-p, –page-requisites
Get all images, etc. needed to display HTML page.
Space taken by a directory in Linux OS/Unix Print E-mail
Get the space taken by directory for Linux OS/Unix

The following command can be used to get the space taken by

du -sh <path of the directory>
[gaurav@home]$ du -sh /var/www/
1.5G    /var/www/
Shutdown Linux after pre-determined time Print E-mail
This is an alternative for Cron

Issue the following command in terminal:
/sbin/shutdown -h +300

Command Details:
sudo : This is to execute the command as root, you will need the password here.
/sbin/shutdown : Command to shutdown the computer.
-h : This tell the shutdown command to power off i.e. halt.
+300 : The minutes before scheduled shutdown, here it is 300 minutes.

Posted from nitinkamath.info
Search and delete files in Unix Print E-mail
This is a useful tip to find and remove some files by searching recursively in a directory and sub directories

This will list down all the *.tmp/*.log files
 find . -type f -name "*.tmp" -exec echo {} \;
 find . -type f -name "*.log" -exec echo {} \;

This will delete down all the *.tmp/*.log files
 find . -type f -name "*.tmp" -exec rm {} \;
 find . -type f -name "*.log" -exec rm {} \;

It will be better to list the files first and then delete them, so that we do not miss out any important file
<< Start < Previous 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 1 - 9 of 110

Join Us
About Us
Contact Us
Support Us
Login(only for dev.)

Royalty Free Images

O'Reilly User Group discount!

Powered By GIMP GIMP
Contact Webmaster Copyleft 2011 gnulinuxclub.org