November 27, 2010

Keep ssh connections alive

Add the follwoing lines to ".ssh/config" in order to have a keep-alive message sent every 300 s, with a maximum of 300 messages:
ServerAliveInterval 300
ServerAliveCountMax 300

August 20, 2010

Location of chkdsk results

The results of chkdsk on Windows (at least when running on Windows XP) can be seen through Control Panel > Administrative Tools > Event Viewer > Applications. The entry has the Source field equal to "Winlogon".

April 14, 2010

How to restrict Windows memory usage

In order to restrict the memory that Windows can use, starting from Vista you can use the command bcdedit (run from a Command Prompt with Administrator privileges):

* To remove 1GB (1024 MB) of physical memory from what can be used by Windows:
bcdedit /set removememory 1024

* To view the curent settings:
bcdedit /enum

* To remove the settings:
bcdedit /deletevalue removememory

ALTERNATIVELY, BUT NOT RECOMMENDED:
 
* To set the physical address limit at 1GB:
bcdedit /set truncatememory 1073741824
OR (in hexadecimal)
bcdedit /set truncatememory 0x40000000

* To remove the settings:
bcdedit /deletevalue truncatememory

April 13, 2010

How to display Linux configuration files

In order to display configuration files on Linux without the clutter of comments, an easy way is to use the following command:
grep -v "^#" /etc/YOUR_CONFIGURATION_FILE

April 12, 2010

Dealing with fuse permission denied

If the following error occurs when trying to use FUSE:
fuse: failed to exec fusermount: Permission denied
then it may be necessary to add yourself to the group "fuse" by using one of the following commands:
sudo gpasswd -a $LOGNAME fuse OR > sudo usermod -aG fuse $LOGNAME

NOTE: You must log out and log in again for this change to take effect!

Show info about user

In order to show various information about a user on Linux, use the command "id [USERNAME]". If the parameter USERNAME is not provided, info about the current user will be shown.
Example output:
id uid=10005(razvan) gid=10005(razvan) groups=10005(razvan) context=user_u:system_r:unconfined_t

February 17, 2010

Post by e-mail

First post by e-mail. Seems to be the most convenient way of posting, isn't it?

First post

First post. Don't expect much activity soon, though. Meanwhile please check my "official" website: http://www.jaist.ac.jp/~razvan/.