Category "linux"

Node.js File Permissions are set at 000 when I create a File. How can I create a file with read write permissions, or change permissions?

I am trying to create a file via Node.js, and would like to specifically use the the FS.openSync() method if possible. Currently I have a very simple class buil

Linux Command , how to find files by size larger than x?

I'm trying to find files with size larger than "x" , ex: 32 bytes But what I found in ls --help was only ls -S , that just sort by size and not satisfied my d

PostgreSQL out of memory: Linux OOM killer

I am having issues with a large query, that I expect to rely on wrong configs of my postgresql.config. My setup is PostgreSQL 9.6 on Ubuntu 17.10 with 32GB RAM

Uncommon baud rate on serial port - Linux

I'm currently trying to make a programm to read a serial port. On this port I receive data with a baud rate of 875000. It's really uncommon and I don't succeed

How to check if a user disconnected, if it's a new disconnection and the server on which the action was made?

I have to create a shell program, such that each time certain users (given as parameters) connect/disconnect from the system, it will save in a text file if its

Crontab in Raspberry pi doesn't run a very simple script

I'm new to Linux and I've been struggling with this issue for a while in my Raspberry Pi and had no success. First I wrote a simple script in /home/myfile.sh l

Installing docker-compose on Amazon EC2 Linux 2. 9kb docker-compose file

First of all, let me state I'm not the most virtuous of Linux users, so bare with me... Below is a brief run-down of all the steps I took. Ultimately the questi

Restart Tomcat Service on AWS EC2 instance, on a schedule

I have an instance on Tomcat running on EC2. Based on some resourcing reasons that I don't want to get into, I'd like it to restart each evening at 11:00pm. I

docker.sock permission denied

When I try to run simple docker commands like: $ docker ps -a I get an error message: Got permission denied ... /var/run/docker.sock: connect: permission

How to write a single line shell script with a while loop and if statement

I am trying to figure out the syntax for having a while loop and an if statement that checks for more than one condition, in a single-line shell script. Execut

How to debug in kernel mode using printk

I am trying to add some stuff to Linux task_struct. In this area I copy a string from the user and try to store it in my struct. I try to debug my code by add

How can a shared library (.so) call a function that is implemented in its loader code?

I have a shared library that I implemented and want the .so to call a function that's implemented in the main program which loads the library. Let's say I have

"'omp.h' file not found" when compiling using Clang

I'm trying to set up an OpenMP project using Clang (3.7.0) on my laptop running Linux Mint. Now I've read that OpenMP is not supported right away so I followed

React application on production - links don't work when requested directly, they work only when accessed by react router

I have deployed an application on a ubuntu server. I ran npm run build, and copied all the content of build inside /var/www/html The file /etc/nginx/sites-avail

iptables moving rule in a list

i have 2 rules of iptables iptables -A INPUT -s 5.5.5.5 -j DROP iptables -A INPUT -s 6.5.5.5 -j ACCEPT is there a function or a command that will swap the

How to distinguish between different operating system distros in node.js?

In node you have access to process.os() and process.platform, which give you one of 5 values: 'darwin' 'freebsd' 'linux' 'sunos' 'win32' But how do you print

IP tuntap command can't open tun

I want to create a TUN interfae I type command in adb like below mkdir -p /dev/net busybox mknod /dev/net/tun1 c 10 200 chmod 666 /dev/net/tun1 ip tuntap add d

Is the sscanf function in the Linux kernel susceptible to buffer overflow attacks?

From what I understand, a typical buffer overflow attack occurs when an attack overflows a buffer of memory on the stack, thus allowing the attacker to inject m

Absolute fastest way to recursively delete all files and folders in a given path. Linux

I am looking for the absolute fastest method of performing unlink and rmdir commands on a path containing millions of files and thousands of folders. I have fo

Docker mounting volume. Permission denied

I have a problem with creating new files in mounted docker volume. Firstly after installation docker i added my user to docker group. sudo usermod -aG docker