Skip to content

ACPI event not triggering associated action

I’ve been trying for some time now to enable my computer’s Fn+F9/F10 brightness control. Reading this thread, I tried to set up an acpi event/action script to manually change my brightness. The scripts themselves work – I can manually call bl_down.sh and bl_up.sh in the terminal. However, fo…

Node.js is installed but it’s not usable

I’m using Debian 9.1.0 and I have installed Node.js by downloading the LTS version Linux Binaries (x64). From the location (where I installed Node.js), I can use it: But when I run it outside this location, like: I got the error: bash: node: command not found The solution I found on Internet: create a s…

How to convert to / get RFC822 date in bash/linux?

Looking at date’s man page, I couldn’t find a standard way to convert to rfc822 (eg: from unix timestamp). I took a brief look at the spec, but I don’t know enough about the subject matter to get the format right. Is there a easy way to convert to rfc822 with standard linux terminal tools? A…

sed command to copy lines that have strings

I want to copy the line that have strings to another file for eg A file contain the below lines I want to copy the lines that has 100 or 200 to another file by skipping all the characters before (first occurrence in a line)100 or 200 I want it to copy 100 50 200 40 100 34 to another

C – get list of opened handlers – duplicate entries

I have this code to retrieve list of opened handlers (mostly FILE) However, when i call single fopen and run this, it prints the same file multiple times (from n to FD_SETSIZE, where n is some offset id… first 0 .. n are some system handlers like dev/nul etc.). Answer Your error check after fcntl(fd, F_…