Recently when i installed Fedora core 8 on my desktop machine, all the mounted drives (windows drives) are getting displayed on the desktop which made it look ugly.
To hide the auto mounted drives on desktop we can use the following command:
gconftool-2 --set /apps/nautilus/desktop/volumes_visible --type bool false
We can also enable/disable the auto mount feature of removable drives at
System -> Preferences -> Hardware -> Removable Drives and Media
Dec 13, 2007
Dec 12, 2007
To extract text/body only from html file without HTML tags
We can use Lynx with the --dump option, like this:
lynx --dump myfile.html > myfile.txt
OR
lynx --dump http://mysite.com/index.html > myfile.txt
lynx --dump myfile.html > myfile.txt
OR
lynx --dump http://mysite.com/index.html > myfile.txt
Add/setup a new route
The syntax is as follows:
route add default gw {IP-ADDRESS} {INTERFACE-NAME}
Where,
* IP-ADDRESS: Specify router IP address
* INTERFACE-NAME: Specify interface name such as eth0
For example if your router IP address is 192.168.1.254 type the following command as the root user:
# route add default gw 192.168.1.254 eth0
route add default gw {IP-ADDRESS} {INTERFACE-NAME}
Where,
* IP-ADDRESS: Specify router IP address
* INTERFACE-NAME: Specify interface name such as eth0
For example if your router IP address is 192.168.1.254 type the following command as the root user:
# route add default gw 192.168.1.254 eth0
Discovering your MAC address in Linux
You can generally find your MAC address with ifconfig-
# /sbin/ifconfig eth0
There should be an entry "HWaddr" on the first line that tells the hardware address for your network card.
Changing the MAC address
In Linux the MAC address can be changed with most network card drivers. This can be useful in cases where there is security based on MAC addresses and you get a new network card. Example to change it:
# ifconfig eth0 hw ether 00:00:00:00:00:00
This just changes it in the software drivers, not the actual MAC address on the hardware (so it has to be done after every boot). Some on-board network cards allow the address to be changed in the BIOS.
# /sbin/ifconfig eth0
There should be an entry "HWaddr" on the first line that tells the hardware address for your network card.
Changing the MAC address
In Linux the MAC address can be changed with most network card drivers. This can be useful in cases where there is security based on MAC addresses and you get a new network card. Example to change it:
# ifconfig eth0 hw ether 00:00:00:00:00:00
This just changes it in the software drivers, not the actual MAC address on the hardware (so it has to be done after every boot). Some on-board network cards allow the address to be changed in the BIOS.
To export a directory with NFS
In order to export or share directory called /data2, you need to edit a file called /etc/exports. The file /etc/exports serves as the access control list for file systems which may be exported to NFS clients.:
# vi /etc/exports
Add config directive as follows:
/data2 *(rw,sync)
Each line contains an export point and a whitespace-separated list of clients allowed to mount the file system at that point. Each listed client may be immediately followed by a parenthesized, comma-separated list of export options for that client.
Where,
* rw - Allow both read and write requests on /data2 NFS volume
* sync - Reply to requests only after the changes have been committed to stable storage
Save and close the file. Restart the nfs service:
# /etc/init.d/nfs restart
NFS client configuration
Client computer need to mount file system using mount command or /etc/fstab file, enter:
# mkdir /mnt/nfs
# mount -t nfs4 nfsserver-name-or-ip:/data2 /mnt/nfs
# vi /etc/exports
Add config directive as follows:
/data2 *(rw,sync)
Each line contains an export point and a whitespace-separated list of clients allowed to mount the file system at that point. Each listed client may be immediately followed by a parenthesized, comma-separated list of export options for that client.
Where,
* rw - Allow both read and write requests on /data2 NFS volume
* sync - Reply to requests only after the changes have been committed to stable storage
Save and close the file. Restart the nfs service:
# /etc/init.d/nfs restart
NFS client configuration
Client computer need to mount file system using mount command or /etc/fstab file, enter:
# mkdir /mnt/nfs
# mount -t nfs4 nfsserver-name-or-ip:/data2 /mnt/nfs
To mount a shared drive in Linux
To mount a shared drive on to a linux machine you can use the following command:
mount -t smbfs -o username=UNAME,workgroup=WGROUP //HOST-NAME/path /MOUNT-POINT
Ex:
mount -t smbfs -o username=mohan,workgroup=mohan //mohan-pc/New\ Songs /mnt/songs
mount -t smbfs -o username=
Ex:
mount -t smbfs -o username=mohan,workgroup=mohan //mohan-pc/New\ Songs /mnt/songs
Subscribe to:
Comments (Atom)