fuser displays the PIDs of processes using the specified files or file systems.For example if you have a locked file named foo.txt on /home/user/,the you would type:
fuser /home/user/foo.txt
The command displays some numbers.Its the pid of process using the file.Now as a root type:
kill <pid>
or
sudo kill <pid>
without the redirectors.Linux has everything you wish for.
Saturday, May 28, 2011
Speeding web browsing with Squid
Squid is a caching proxy server.I live in the place where a high speed internet connection is just a fake dream.So using Squid really helped me a lot.
Requirements:
Squid-Available from your repo.
Yast2-Squid-If you use openSUSE, this is the graphical method of configuring Squid.If you have other Linux variant,you could try ostatic.com/squid-config as an alternative.
Head over to Yast and launch Squid configuration.Check 'Start Squid at boot time' and on cache directory option, increase the value of cache size to optimum size.Open your browser, go to Preferences ------>Network and change proxy to
Address:127.0.0.1
Port:3128
Restart the computer and check the differences after some days.
Requirements:
Squid-Available from your repo.
Yast2-Squid-If you use openSUSE, this is the graphical method of configuring Squid.If you have other Linux variant,you could try ostatic.com/squid-config as an alternative.
Head over to Yast and launch Squid configuration.Check 'Start Squid at boot time' and on cache directory option, increase the value of cache size to optimum size.Open your browser, go to Preferences ------>Network and change proxy to
Address:127.0.0.1
Port:3128
Restart the computer and check the differences after some days.
Friday, May 27, 2011
Convert an ext3 file system into ext4
Ext4 file system provides better performance and faster file system check than the ext3 file system.
If you want to convert your existing file systems,the the first requirement is with the kernel.
Type
uname -a
and make sure it is higher than 2.6.28.
To switch over to the Ext4drivers without changing any files,edit the fstab file located in /etc and replace every occurrence of ext3 to ext4.
Now issue:
sudo tune2fs -o extents,uninit_bg,dir_index <dev>
where dev stands for disk edited in the previous step.
As for example,if my disk was /dev/sda1, then I would do:
sudo tune2fs -o extents,uninit_bg,dir_index dev/sda1
Now restart your computer and do:
grub-install <dev>
to install Grub to latest build.
Now, new files will be utilizing the features of new file system and old ones will be using ext3.
If you want to convert your existing file systems,the the first requirement is with the kernel.
Type
uname -a
and make sure it is higher than 2.6.28.
To switch over to the Ext4drivers without changing any files,edit the fstab file located in /etc and replace every occurrence of ext3 to ext4.
Now issue:
sudo tune2fs -o extents,uninit_bg,dir_index <dev>
where dev stands for disk edited in the previous step.
As for example,if my disk was /dev/sda1, then I would do:
sudo tune2fs -o extents,uninit_bg,dir_index dev/sda1
Now restart your computer and do:
grub-install <dev>
to install Grub to latest build.
Now, new files will be utilizing the features of new file system and old ones will be using ext3.
Bad experience with Ubuntu 11.04
OK!
After rounds of hearing that Ubuntu is the easiest distro,I downloaded Ubuntu 11.04 after a year of downloading 10.XX(LTS).
Unity interface really sucked.I spent 10 minutes just searching for Graphical settings and found that there was not any.YAST made me too lazy.
In a country with 128 Kbps internet, I had no problem updating openSUSE, thanks to delta packages.
When I tried updating Ubuntu released 10 days before,a whooping 168MB of update made me press the reset button, go to openSUSE, open Disk utility and delete the partition at once.
But I thought openSUSE has to learn something from Ubuntu.The unified Application store is one of these to be inspired of.
After rounds of hearing that Ubuntu is the easiest distro,I downloaded Ubuntu 11.04 after a year of downloading 10.XX(LTS).
Unity interface really sucked.I spent 10 minutes just searching for Graphical settings and found that there was not any.YAST made me too lazy.
In a country with 128 Kbps internet, I had no problem updating openSUSE, thanks to delta packages.
When I tried updating Ubuntu released 10 days before,a whooping 168MB of update made me press the reset button, go to openSUSE, open Disk utility and delete the partition at once.
But I thought openSUSE has to learn something from Ubuntu.The unified Application store is one of these to be inspired of.
Mounting NTFS partitions with full read-write support
By default,NTFS filesystems are
readable by users and writable by root only.But it may pose a difficulty to people doing dualboot with Windows.So here is a easy way out:
- Copy fstab from /etc/ to your
Desktop or any other folder. - Open it and edit as
Original | To do |
fmask=133 | fmask=113 |
dmask=022 | dmask=002 |
In my case it was:
/dev/disk/by-id/ata-WDC_WD5000AADS-00S9B0_WD-WCAV9C076470-part7 /windows/g ntfs-3g user,users,gid=users,fmask=113,dmask=002,locale=en_US.UTF-8 0 0
And remember to add user to the end.
Labels:
dmask,
fstab,
fstab ntfs,
linux write ntfs,
linux write windows,
ntfs,
read write ntfs,
umask,
windows partition
Subscribe to:
Posts (Atom)