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…
Makefile dealing with different source and object directories under Windows and Linux
I have a problem creating a Makefile for a project with source files scattered in different folders. As the source files might have the same names, I’d like to send the objects into different folders as well. With a single source and object file, I’m doing fine following rules like posted elsewher…
createrepo using –split option for a multi CD distribution
I am trying to create a customized CentOS multi CD installation. Our current distribution just grew past the size of a CD. Sure, you can just burn it on a DVD. Well, we have customers with old machines that do not support DVDs so I have to create a distribution on 2 CDs. So far, I’ve found createrepo us…
Proper indentation of Bash script
I have written a Bash script which uses cases and functions for university, but no matter where I move the scripts, she says that they are not indented properly. What is the correct indentation of this sample of the script? Is there a website or a function on VMware where I can get my code automatically inden…
Using Cgroups to limit cpu usage
I am trying to use cgroups in order to limit the CPU usage. I am using this guide https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu_and_memory-use_case.html My /etc/cgconfig.conf file is the following My cgrules.conf is the following Althouth when …
permission denied when using su to execute a node program
here is my node program it is in /home/test/ and the test directory ‘s privilege is rwxrwxrwx. when i run node test.js with the tomcat account, the data.txt could be created. but when i run a service to execute su tomcat -c ‘node /home/test/test.js’, the data.txt could not be created and the…
Playing with shmat and shm_open
I just read the manpages for shm_open and shmat and was trying out the following example. In a file test.c I do, And in a wrapper file I do, I tried adding in a strerror(errno) at test.c and I get Identifier removed. What does that mean? What am I doing wrong? Given a shared memory identifier(shmid), shouldn&…
QtCreator – start external tool in an interactive bash
A while ago I discovered that you can make QtCreator call external tools directly from within the IDE and pass various arguments to those via the Tool->External. I find this pretty convenient however I’m currently struggling with the issue of starting a terminal-based application in an interactive ba…
Heroku buildpack: permission denied on npm install in bash script
I am creating a Heroku build pack and getting an npm permission denied when deploying with the build pack. Here’s the error from the build logs, permission denied when running npm install: I am packaging npm in a tar.gz and using that. In my compile file: Answer Is it possible that either npm or node is…
How to call this shell script to convert mysqldump to SQLite compatible syntax
I need to autonomously convert mysqldump files (.sql file) to SQLite compatible .sql files. I found this script on github which is supposed to be able to do this. If I had an unmodified .sql file from MySQL called test.sql whose database’s name was test and the script mysql2sqlite.sh in a directory, how…