0/160

linux Questions

votes
mercutio   2018-06-20 13:27

UTF-8 all the way through

I'm setting up a new server, and want to support UTF-8 fully in my web application. I have tried in the past on existing servers and always seem to end up having to fall back to ISO-8859-1. Where ...
necromancer   2018-06-21 14:18

Dude, where's my php.ini?

A few years ago I installed Apache 2.2x and PHP 5.3.1 on a Linux server I maintain. I used .tar.gz's and built them as instructed (instead of rpms and what-have-you). And all was fine. Today I need ...
thoslin   2018-07-14 01:32

How to use regex with find command?

I have some images named with generated uuid1 string. For example 81397018-b84a-11e0-9d2a-001b77dc0bed.jpg. I want to find out all these images using "find" command: find . -regex "[a-f0-9\-]\{36\}\....
chmurli   2018-07-18 15:25

What is “:-!!” in C code?

I bumped into this strange macro code in /usr/include/linux/kernel.h: /* Force a compilation error if condition is true, but also produce a result (of value 0 and type size_t), so the expression ...
ahmedaly50   2018-07-18 19:55

Why does the C preprocessor interpret the word “linux” as the constant “1”?

Why does the C preprocessor in GCC interpret the word linux (small letters) as the constant 1? test.c: #include <stdio.h> int main(void) { int linux = 5; return 0; } Result of $...
Constan7ine   2018-07-21 01:29

What is Linux's native GUI API?

I hope this doesn't come across as a stupid question but it's always something I have wondered. Both Windows (Win32 API) and OS X (Cocoa) have their own APIs to handle windows, events and other OS ...
mingchaoyan   2018-07-21 19:45

Why does ENOENT mean “No such file or directory”?

What is "ENT" short for? The error "No such file or directory" should just be named by "ENOFILE". Is there any story or reason?
Ralph   2018-09-06 11:02

Undefined reference to pthread_create in Linux

I picked up the following demo off the web from https://computing.llnl.gov/tutorials/pthreads/ #include <pthread.h> #include <stdio.h> #define NUM_THREADS 5 void *PrintHello(void *...
user17918   2018-09-07 02:45

Threads vs Processes in Linux

I've recently heard a few people say that in Linux, it is almost always better to use processes instead of threads, since Linux is very efficient in handling processes, and because there are so many ...
user60008667   2018-09-07 21:15

Maximum number of threads per process in Linux?

What is the maximum number of threads that can be created by a process under Linux? How (if possible) can this value be modified?