Questions tagged [unix]

NOTICE: All Unix questions must be related to programming; those that aren't will be closed. Use this tag only if your question relates to programming using Unix APIs or Unix-specific behavior, not just because you happen to run your code on Unix. General software issues should be directed to Unix & Linux Stack Exchange or to Super User.

Tag usage

The tag can be used for Unix system programming related problems. The tag can also contain programming questions about using the Unix platform. For non-programming Unix usage questions, visit the Unix & Linux Stack Exchange site.

Background

Unix was developed as an in-house operating system for AT&T, but in the 1980s became both a prime academic operating system (with U.C. Berkeley's version, called BSD, being the reference platform for development of what would become the Internet) and a commercial success in the form of AT&T's System V, Microsoft/SCO's XENIX (PCs) and various workstation versions from Sun, Silicon Graphics, and others.

In the 1990s, Sun's Solaris and the free Unix clone Linux would rise in popularity. Linux is largely Unix-compatible but lacks the trademark. Currently, Unix is commonly found on server platforms; the primary desktop variant is Mac OS X, based on BSD.

Apart from its command-line interface, most "Unices" support the standardized X Window System for GUIs. (So does Mac OS X, but its primary GUI is Apple's proprietary Quartz.)

The various Unix implementation (and to a lesser extent, clones such as Linux) are unified in a standard called POSIX. C has been its primary programming language since the 1970s, but many other languages are available.

Read more

47509 questions
20
votes
1 answer

What does signal(SIGPIPE, SIG_IGN); do?

I know the individual uses of SIGPIPE and SIGIGN. What does signal(SIGPIPE, SIG_IGN); exactly do?
xennygrimmato
  • 2,646
  • 7
  • 25
  • 47
20
votes
3 answers

Centos 7 / Apache / PHP - mkdir(): Permission denied

Before you yell DUPLICATE! and banish me into the abyss, hear me out. :) I've been developing an intranet site for the company I work with, and originally I was developing it directly from my workstation running Windows 7 / IIS. As I've neared…
Fata1Err0r
  • 836
  • 1
  • 6
  • 14
20
votes
4 answers

Change Port of Mysql Server in Phpmyadmin

I have two instances of MySql (5.1.73-1-log) running on my server, one on port 3306 (default), one on port 3307. Now, I want to change PhpMyAdmin (3.3.7deb7) to take the second instance, on 3307, instead the default one. Thus, I add the following…
Lokomotywa
  • 2,624
  • 8
  • 44
  • 73
20
votes
7 answers

How to use parallel execution in a shell script?

I have a C shell script that does something like this: #!/bin/csh gcc example.c -o ex gcc combine.c -o combine ex file1 r1 <-- 1 ex file2 r2 <-- 2 ex file3 r3 <-- 3 #... many more like the above combine r1 r2 r3 final \rm r1 r2 r3 Is…
Lazer
  • 90,700
  • 113
  • 281
  • 364
20
votes
3 answers

How to access Unix Domain Sockets from the command line?

Reading a Unix Domain Socket file using Python is similar to an ordinary TCP socket: >>> import socket >>> import sys >>> >>> server_address = '/tmp/tbsocket1' # Analogous to TCP (address, port) pair >>> sock = socket.socket(socket.AF_UNIX,…
Adam Matan
  • 128,757
  • 147
  • 397
  • 562
20
votes
4 answers

Sorting Scientific Number With Unix Sort

I tried to sort these number with Unix sort, but it doesn't seem to work: 2e-13 1e-91 2e-13 1e-104 3e-19 9e-99 This is my command: sort -nr file.txt What's the right way to do it?
neversaint
  • 60,904
  • 137
  • 310
  • 477
20
votes
2 answers

How to load bash command history from file

I am moving from one server to another, but want to keep my history, so I dumped it into a file. history > file.txt Is there a way to overwrite the commands-history of bash and load it from a file?
Shaharg
  • 971
  • 1
  • 11
  • 26
20
votes
3 answers

Best Method to run a Java Application as a *nix Daemon or Windows Service?

I am looking for the best method to run a Java Application as a *NIX daemon or a Windows Service. I've looked in to the Java Service Wrapper, the Apache Commons project 'jsvc', and the Apache Commons project 'procrun'. So far, the Java Service…
Matt Cummings
  • 2,026
  • 1
  • 20
  • 22
20
votes
1 answer

How to undo "set -x" in unix shell?

In following some random directions on the internet, trying to debug an issue of mine at a shell (I use zsh), I ran set -x. Thanks to this I figured out my issue. However, I'm now in an awkward position of not knowing how to turn this debugging off…
Brian Peterson
  • 2,800
  • 6
  • 29
  • 36
20
votes
4 answers

Why is data written to a file opened with O_APPEND flag, always written at the end, even with `lseek`?

I have been given a programming assignment: Write a program that opens an existing file for writing with the O_APPEND flag, and then seeks to the beginning of the file before writing some data. Where does the data appear in the file? Why? What I…
KarimS
  • 3,812
  • 9
  • 41
  • 64
20
votes
2 answers

How does traceroute work?

It seems almost magical. What is the traceroute command doing in order to map out the entire path to some other node on the Internet?
raldi
  • 21,344
  • 33
  • 76
  • 86
20
votes
3 answers

Supervisorctl error: unix:///var/run/supervisord.sock refused connection?

This is my config flie.I run supervisord -c /etc/supervisor/supervisord.conf it works well. When I try to run supervisorctl -c /etc/supervisor/supervisord.conf,the error happened: Error: , Unknown protocol for serverurl /var/run/supervisord.sock:…
cruelcage
  • 2,044
  • 6
  • 19
  • 19
20
votes
5 answers

Getting permission denied for SCP over SSH server to local

I'm trying to scp some files from a server to my local machine but I either get a permission denied, or the server is copying the files to the server ex: scp username@host:/files/to/copy/from/\* /path/of/local/destination/ --> permission denied scp…
user2494770
20
votes
2 answers

Difference between 'Killed' and 'Terminated'

I was just testing kill switch flags with a sleeping process. First i tried killed it with -15 xtechkid@ubuntu:~/Desktop/expermiments$ ps cax | grep 10005 10005 pts/2 S+ 0:00 sh xtechkid@ubuntu:~/Desktop/expermiments$ kill -15 10005 And…
Sudheej
  • 1,873
  • 6
  • 30
  • 57
1 2 3
99
100