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:


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?


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


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
  • There isn't any file limit like that in the system. There must be something in the keylogger program itself. Commented Apr 26, 2014 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
    Commented Apr 26, 2014 at 20:13
  • Just in case, did you check that you have enough space in the file system? Commented Apr 26, 2014 at 20:15
  • @PavelŠimerda yes I have enough space in my drive, about 15GB at least
    – kenn
    Commented Apr 26, 2014 at 20:17
  • You can also make a simple test to see that you can easily append to large files by running yes >> yourfile. Commented Apr 26, 2014 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).

  • 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
    Commented Apr 26, 2014 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
    Commented Apr 26, 2014 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
  • Dosn't look like an answer. Commented Apr 27, 2014 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).

  • Doesn't look like an answer. Commented Apr 27, 2014 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. Commented Apr 27, 2014 at 22:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .