I should create a file inside this file an archive. When I create it, I should use chmod so that the archive should have 757 rights. I did this but I failed, is this right or wrong? : Answer Use touch command first:
Tag: linux
resend packets via RAW sockets in linux
It’s needed to read raw data from one interface and send it via another. open&&config(the same for sock_raw_outer): then in cycle: then, if I catch on sock_raw_inner any packet(arp request, for example), it sended on sock_raw_inner again and again by sendto. What’s wrong? Thanks. Answer Yo…
Shell: How to move multiple files to a directory and zip that directory with different name?
Fore example, I have some files in my project, structure could be like this I want to zip some files from my project and I can do that using ZIP command (build folder and some other files are excluded from zip) After this new file is created: In Mac Finder when I double click on this file it becomes unzipped
Undefined reference to process(std::__cxx11::basic_string … ) when compiling affdex linux sample applications
I encountered the following error when I tried to compile affdex sdk sample applications I’m using GCC 5.2.1 Answer My initial suspicion was that the problem is attempting to compile the apps using a newer GCC or rather GLIBCXX than what the sdk is compiled with (gcc v4.8). The error msg refers to an un…
basic linux x86 assembly minimum number returns incorrectly
I wrote this basic linux x86 assembly app. I expect it to return 3 when I do echo $? however the status is always 0. What am I doing wrong? Note: %ebx always contains the status code, and it should contain the min value by exit time. Fixed: Answer The issue is that the terminating zero also participates in th…
How to compile C code on Linux/GCC without deprecated functions being available?
There are old functions such as index, rindex which have now been superseded by strchr and strrchr. Is there a way to configure the compiler or defines so these functions aren’t available? It can cause confusing warnings when: accidentally using index name outside of scope for eg – or worse, not w…
Site with underscore at the end of 4th level domain name can’t be reached
We have our devel server in our company. Since 2006 we have this rule – if the project is finished and moved to production we have to append an underscore to the project name in the filesystem. So the url is changed from to I’m a linux user since 2008 but I was never able to open this site. It
MySQL code causes PHP script to crash at popen/exec
I have the following PHP 5.6.19 code on a Ubuntu 14.04 server. This code simply connects to a MySQL 5.6.28 database, waits a minute, launches another process of itself, then exits. Note: this is the full script, and it’s purpose is to demonstrate the problem – it doesn’t do anything useful. …
Improve mysql Speed?
I have mysql/php script running on my linux machine. Its basically migrating files content to MySql table. there are about 4400,000 Files, Account files each file`s content is places in a table in one row. It have been 14 hours and so far it have only done 300,000 Accounts. At first it was very fast and was d…
Why does ksh fail to capture standard error during nested command substitutions?
I have the following shell script. It produces the following output in bash, zsh, dash and posh. It makes sense because there is no such command called bogus on the system. But in ksh on Debian, it does not print the error message due to invoking the bogus command. What went wrong? In case, you want to know a…