Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have Ubuntu 13.10. I have a keylogger to help me remember what I did. Running keylogger prints output to the terminal when I run it like this:

keylogger

I added it to startup like this:

keylogger >>/home/user/log

It records it well, but when the log file exceeds 1MB or 2MB it stops writing to the log file.

Is there such a file size limit for output redirection?

EDIT#1

I forgot to mention, my file was a hidden file like /home/user/.log, in case that matters.

EDIT#2

output of ulimit -a:

 $ ulimit -a
 core file size          (blocks, -c) 0
 data seg size           (kbytes, -d) unlimited
 scheduling priority             (-e) 0
 file size               (blocks, -f) unlimited
 pending signals                 (-i) 23953
 max locked memory       (kbytes, -l) 64
 max memory size         (kbytes, -m) unlimited
 open files                      (-n) 1024
 pipe size            (512 bytes, -p) 8
 POSIX message queues     (bytes, -q) 819200
 real-time priority              (-r) 0
 stack size              (kbytes, -s) 8192
 cpu time               (seconds, -t) unlimited
 max user processes              (-u) 23953
 virtual memory          (kbytes, -v) unlimited
 file locks                      (-x) unlimited
share|improve this question
    
There isn't any file limit like that in the system. There must be something in the keylogger program itself. –  Pavel Šimerda Apr 26 at 20:03
    
@PavelŠimerda Thank you for responding. I have another keylogger, it behaves the same. What can be wrong with keyloggers? They print out to stout well. When I remove bloated file, keylogger continues to append to new file at next log.in –  kenn Apr 26 at 20:13
    
Just in case, did you check that you have enough space in the file system? –  Pavel Šimerda Apr 26 at 20:15
    
@PavelŠimerda yes I have enough space in my drive, about 15GB at least –  kenn Apr 26 at 20:17
    
You can also make a simple test to see that you can easily append to large files by running yes >> yourfile. –  Pavel Šimerda Apr 26 at 20:17

3 Answers 3

You might be a vicitm of a file size limitation imposed by process or user limits via ulimit (or limit).

share|improve this answer
    
Thank you for the answer. How can I check if ulimit affects my system? I don't know if it makes any difference my file was a hidden file. –  kenn Apr 26 at 20:34
    
Look at the man page for the particular shell you are using for either limit or ulimit, that should give you the information you need. –  mdpc Apr 26 at 20:35

You don't specify but does it exhibit this issue when you run it just in the terminal or when run from your startup?

Also to see why it stops I'd debug it further like so:

$ strace -s 2000 -o keylog.log keylogger >> /home/user/log
share|improve this answer
    
Dosn't look like an answer. –  Pavel Šimerda Apr 27 at 7:19

Maybe a badly configured log rotator ? Maybe another app trying to grab your file ? (use another name).

Can you append anything to your log file after keylogger has been stopped ? As a wrap around, you could use "script" if you want exactly what has been displayed at your terminal. Otherwise you can see you lately used command through termina's history (.bash_history for example).

share|improve this answer
    
Doesn't look like an answer. –  Pavel Šimerda Apr 27 at 7:19
    
unless you type script in your terminal (bash) and then check a file named typescript. it's a dump of what has been printed in your terminal. –  Nikolaidis Fotis Apr 27 at 22:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.