Skip to content

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 …

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&…

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…