Category: Work related


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 […]

RHEL5 – yum update works but pup and yum list-security does not

By: | Comments: 85 Comments

Posted in categories: Antiques, Computer Tips

The RHEL5 machines under my administration experienced an interesting error.  If running pup, whenever there are updates exist, it crashes with the error: SyntaxError: not well-formed (invalid token) The error message will be things like # yum list-security Loading “rhnplugin” plugin Loading “security” plugin Setting up repositories rhel-i386-server-cluster- 100% |=========================| 1.4 kB 00:00 rhel-i386-server-5 100% […]

Multiple Cygwin coexist

By: | Comments: 7 Comments

Posted in categories: Computer Tips

in one cygwin, do mount -m > c:/somewhere/mount-cygwin1 in another cygwin, do mount -m >c:/somewhere/mount-cygwin2 then edit their cygwin.bat, add lines umount -A sh C:/somewhere/mount-cygwin1 in the first cygwin.bat after @echo off line then edit the second cygwin.bat, add lines umount -A sh C:/somewhere/mount-cygwin2 in the cygwin.bat after @echo off line now two versions of […]

How do I defragment “C:\$Extend\$UsnJrnl:$J:$DATA”?

By: | Comments: 12 Comments

Posted in categories: Computer Tips

This huge file is used by Windows to track changes in other files and cannot be defragmented. You can delete it by entering the following on the Run commandline (Windows 2003/XP/Vista, not Windows 2000), it can take several minutes to finish: fsutil usn deletejournal /n c: