Skip to content

Tag: linux

mount fails from spawned process

I want to start a process that uses a USB hard drive once it gets inserted. Since UDEV rules specifically mentions not to run long-time processes from RUN command, I send a FIFO message to my service which then opens the relevant process. So the flow goes like this: UDEV > runs action process > sends FI…

C: strtok and newlines in Windows vs Linux

I’m working on a C school assignment that is intended to be done on Windows, however, I’m programming it on OS X. While the other students working on Windows don’t have problems reading a file, I do. The code provided by the tutors splits the contents of a file on n using this code: However,…

Using linux system commands in R to remove special characters

I’m trying to clean files using linux system commands in R I would like to use a command that removes special characters apart from the file separator (pipe delimited) In the example below it’s the slashes and additional quotation marks that I’m trying to get rid of I’ve used the comma…

How to find newest files with a certain name?

Suppose I have a directory with many files of the same name in subdirectories (for example, comes up when keeping BibTeX files for multiple academic papers). What’s the best way to find the newest version of a file with a given name? I’ve come up with the following command which lists all the file…