Skip to content
Advertisement

Tag: unix

Combining find command conditions

I am trying to combine 2 find commands to pipe to a grep pattern match. my 3 commands are: get files modified in the last 24 hours: ignore a couple of directories: find pattern in the file’s lines: I have gotten below to work but cant seem to add directory skipping into the mix. get files modified in the last

Why cat 0>file doesn’t work

In Unix, I know that 0 1 and 2 represent stdin stdout and stderr. As my understanding, the command cat meaning “concatenate” can concatenate different files. For example, cat file>&1 can concatenate the file and the stdout and the arrow means the redirection from the fileto the stdout, so we can see the content of the file from the terminal

LINUX GNU Create New user Postgres DB in Makefile

I’m new with Makefile. I need to automate create user for postgres terminal. I tried this example and it did not work for me: Neither @create user myusername; nor @/q works. When I ran make createuser and exit manually with q from postgres terminal, I receive this error: Answer When debugging makefiles, the @ modifier is unhelpful, as it no

How to implement a process overseeing another process?

Currently at my workplace I have a script named “batch launcher” (written in bash), which is supposed to oversee the execution of batches, logging their output and processing the return code of the batch. This is currently done via env call within this “batch launcher”: Several days ago, one of the batches written in perl made a kill call on

Track down high CPU load average

Trying to understand what’s going on with my server. It’s a 2 cpu server, so: While on load avergae, queue is showing ~8 : So You can assume, load is really high and things are pailing up, there is some load on the system and it’s not just a spike. However, Looking at top cpu consumers: Results of free command:

Advertisement