Sometimes I need to run command like this:
cat file.txt | awk ' NR%4 == 2 { print $1 }' | sort | uniq -c | sort -gr >>output.txt &
over large files (2-32 GB of size). I start the command in the evening and when I come in the morning, output.txt is sometimes empty and the process is not running any more.
Please, how can I track what is happening? Why and when my command failed? I know that pipeline is working, because sometimes it just finishes successfully.
Thanks a lot!
UPDATE: I now think that my process was killed because the server when I am running this computations is recommended for interactive use only. If this is true, only thing I can see from the logfile is that is was not successful - has not finished.
Is there any way to find out that my process was actually killed? Thanks.