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…
How to insert a new record(row or line) after the last line of input file using awk?
The marks of the students are given as a table in the following format Name | rollno | marks in exam1 | marks in exam 2 … i.e. There is one record per line and each column is separated by a | (pipe) character.At the end of all the records I want to add extra lines which contains information about
Passenger repository certificate verification failed
I want to install Passenger server on my virtual machine, so I do the following: But after I update I get this errors: I already installed it previously many times and had no problems. I have no idea what might go wrong. Answer Fixed that by reinstalling Ubuntu on clean VM. This issue might appeared because I…
Interpreting STRACE output – pipes and forks
I have the following code written in C, taken from https://beej.us/guide/bgipc/html/multi/pipes.html: When compiling and running this code in the terminal using strace I get the following output: Can anybody explain, line by line, what is going on in the strace output? I’ve attempted to research how to …
TortoiseGit – copy via sftp on pull
Intro: I have 2 folders which are on the same GIT repository, one is on a very slow Samba network drive, and one locally. using GIT on samba is extremely slow, but the Samba is my server, which is actually vmplayer running ubuntu server on a windows machine. My question is: is it possible to automatically cop…
Is iptables thread safe?
This seems to me to be a basic question, but google and SO fail to give me an answer. As the title says, is iptables thread safe? If I have multiple processes making calls to iptables, should I create a lock for myself? There seems to be some threads from 2009 querying if netfilter is thread-safe, with no sol…
Getting ‘Insufficient rights’ and ‘userhelper must be setuid root’ error/warning while using consolehelper
‘/usr/bin/myapp’ is a link to ‘/usr/bin/consolehelper’. When non-root user try to run ‘/usr/bin/myapp’ on command prompt, it shows ‘userhelper must be setuid root’. But running with ‘sudo /usr/bin/myapp’ it works fine. While using with GUI, it shows …
I read more than I write in file
I have a file, partitioned in fixed sized blocks. I am copying a test_file.txt into the 3rd block of the file. I read and copied 18 bytes. Then I am trying to copy from the file that very same .txt file I just imported to a newly created .txt, but I am writing 256 bytes to the new file. Moreover,
system call open() creating executable
So my code creates and writes to the out_file properly. However, the file is an executable for some reason. I think the fault is in my open() call but I can’t seem to find why. Answer man 2 open explains why: So if you want a file that’s not executable, you can use: 0666 will suggest read/write fo…