Skip to content

Tag: linux

Bash script, find command, using wildcards or regex

I am writing a bash script that goes over all files in certain directory and: Picks the files with names that match a specified pattern Sorts them by data and time (date and time are part of the filename) Takes X oldest files Performs certain operations on them The pattern used to match the files is passed to…

POSIX threads vs parallelism

Do POSIX threads (managing by pthread library) works parallelly? My lecturer has told us that this library creates only user threads, that are not managed by Linux kernel. I wrote some code that fill large matrix and compared times of execution for threads and whole program and it seems to works parallelly. C…

chaining multiple epoll instances

Can we add file descriptor returned by epoll_create to another epoll instance using epoll_ctl. how do we chain multiple epoll instances in the application, lets say if we have 2 epoll instances one coming from the application and the other coming from library. Please advise. Answer From man epoll Q3 Is the ep…

Many-to-one two-way communication of separate programs

I’m trying to make two-way many-to-one communication between programs in Linux. My plan is the following: One program called “driver” that talks with the hardware needs to communicate with an unknown number of applications in Linux. I read that one of the most common ways for inter process c…

how do I get bash globbing to work in script

I am trying to convert some of my ksh93 scripts to bash in cygwin. I have found 2 things right now that give me trouble. The first is a function I put in .bashrc was not recognized in the script. I put the function in the script to get around that. The second is that it won’t glob like it