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…
Tag: linux
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…
Debug information file conventions for Red Hat/Fedora?
According to lothar’s answer at How to generate gcc debug symbol outside the build target, I can create a two part executable – the stripped executable and the debug information file. After creating the stripped executable and the debug information file, I install the executable as normal (with ma…
Linux shell script, differences between two directories
I made this code I want to compare two folders and the folder are arguments to the command line.. it should be something like this : ./script.sh dir1 dir2 But i have this eror : **./director.sh: line 29: `$1′: not a valid identifier ** I want to count the file from dir1 who is argument to the command li…