Category: Computer Tips


Linux: add a swap file

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

To add a swap file: Determine the size of the new swap file and multiple by 1024 to determine the block size. For example, the block size of a 64 MB swap file is 65536. At a shell prompt as root, type the following command with count being equal to the desired block size: dd […]

Grub boot without GUI

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

When booting, click any key to drop into grub booting menu, click Tab to bring up option line. Append 1 or 3 after the kernel line.  Then it will boot without GUI. This is useful in case the X configuration is messed up.  Normal booting will result a locked display as well as locked mouse […]

selinux use nfs home dir

By: | Comments: 1 Comment

Posted in categories: Computer Tips, Work related

echo “1 1” > /selinux/use_nfs_home_dirs

Get rid of “\\n” in files

By: | Comments: 3 Comments

Posted in categories: Computer Tips

cat fn.txt | tr ‘\\\n’ ‘  ‘ > fn.1.txt sed -i ‘s/  //g’ fn.1.txt mv fn.1.txt fn.txt

Launch X11 xterm windows from anywhere UNIX

By: | Comments: 3 Comments

Posted in categories: Computer Tips

tell application “X11” activate end tell

Fedora: Starting abrt daemon: abrtd: Failed to start: timeout waiting for child

By: | Comments: 11 Comments

Posted in categories: Computer Tips

This is listed as Bug 524469 but never a real solution was drawn. https://bugzilla.redhat.com/show_bug.cgi?id=524469 However, this is an easy thing, that the user abrt was not created. This cab be figured by running $ abrtd -vvvv Cure: create the user abrt, as: abrt:x:399:398::/etc/abrt:/sbin/nologin Also you will need to make sure that certain lines exist in group, […]

Use md5 checksum to identify malware

By: | Comments: No Comments

Posted in categories: Computer Tips, Work related

1) download md5deep from here: http://md5deep.sourceforge.net/#download 2) run the DOS script: @echo off if exist c:\out.txt del c:\out.txt for /r c:\ %%a in (*) do (md5deep %%~sa >> c:\out.txt) This will take hours, if you have plenty files. Note: You can change the c:\out.txt to anything you will feel more comfortable, and use like (*.exe […]

Limited by AUTH_SYS, NFS can only handle 16 groups for each user

By: | Comments: 2 Comments

Posted in categories: Computer Tips, Work related

http://www.insectnation.org/articles/2007/05/08/linux-nfs-16-group-limit/ unless you’d like to suffer the kerberos auth.

linux Oops: I deleted an improtant file, can I undelete?

By: | Comments: 53 Comments

Posted in categories: Computer Tips, Work related

Linux does not offer a file undelete or unerase mechanism, especially in command line. To undelete a really deleted file, it take guru’s work like in http://www.cyberciti.biz/tips/linuxunix-recover-deleted-files.html This is the last thing one can do.  However, if you take a few precautions, you may save yourself easily. There is a small package named ptrash, which […]

fsck: Couldn’t fix parent of inode : Couldn’t find parent directory entry

By: | Comments: 281 Comments

Posted in categories: Computer Tips, Work related

In linux file system, when file system error happens, the first choice is to do an fsck of the unmounted file system. Usually, fsck -y /dev/sdxx at boot time should be able to fix everything, if the FS has not been severely damaged. Occasionally, as reported as Debian bug list #478546 at http://groups.google.com/group/linux.debian.bugs.dist/browse_thread/thread/dc48335d2ca42b66 fsck returns […]