Shell

There are known issue regarding AFP on FreeNAS. Sometimes AFP can’t start properly and it continuously restarts. You can see it in the log and web GUI console. How to deal with it? Simply log in using SSH to your FreeNAS machine and type the following command:

$ sudo pkill afp

If this is not effective try:

$ sudo pkill -9 afp

That commands kills all processes with string “afp” in process name. Now try turn on the service using FreeNAS GUI.

Sometimes generation process of secure key can be a little bit problematic because of not enough random bytes available in software pseudo-random device. You could see a message like this (for PGP key gen):

**We need to generate a lot of random bytes. It is a good idea to perform some other action (type on the keyboard, move the mouse, utilize the disks) during the prime generation; this gives the random number generator a better chance to gain enough entropy. Not enough random bytes available. Please do some other work to give the OS a chance to collect more entropy! (Need 210 more bytes)**

Continue Reading

Sometimes you need to combine two text files basing on values in specified columns of that files (on the similar way like SQL JOIN operation). In the Linux it can be easily done using join shell command. Let’s take a look on the following example. Suppose we have two files:

$ cat ./file1.txt
1 aa
2 bb
3 cc
4 dd
$ cat ./file2.txt
1 ee
2 ff
3 gg
4 hh

Continue Reading