Questions tagged [unix]

This tag is EXCLUSIVELY for PROGRAMMING questions that are directly related to Unix; general software issues should be directed to the Unix & Linux Stack Exchange site or to Super User. The Unix operating system is a general-purpose OS that was developed by Bell Labs in the late 1960s and today exists in various versions.

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

45195 questions
17
votes
4 answers

How do unix signals work?

How do signals work in unix? I went through W.R. Stevens but was unable to understand. Please help me.
user507401
  • 2,561
  • 9
  • 23
  • 20
17
votes
2 answers

How can I find out what my symbolic link is pointing to?

Making a bash script, and I am trying to figure out a way to find out what my symbolic link points to. Right now, I am doing it with this, but this only works if my symlink is in the current directory. Is there a way to find out what my symlink is…
Strawberry
  • 58,930
  • 53
  • 138
  • 190
17
votes
4 answers

How to make a multi-character parameter in UNIX using getopt?

I'm trying to make a getopt command such that when I pass the "-ab" parameter to a script, that script will treat -ab as a single parameter. #!/bin/sh args=`getopt "ab":fc:d $*` set -- $args for i in $args do case "$i" in -ab) shift;echo…
Waffles
  • 397
  • 2
  • 4
  • 10
17
votes
3 answers

Difference between $() and () in Bash

When I type ls -l $(echo file) output from bracket (which is just simple echo'ing) is taken and passed to external ls -l command. It equals to simple ls -l file. When I type ls -l (echo file) we have error because one cannot nest () inside external…
run4gnu
  • 183
  • 1
  • 7
17
votes
5 answers

xargs with command that open editor leaves shell in weird state

I tried to make an alias for committing several different git projects. I tried something like cat projectPaths | \ xargs -I project git --git-dir=project/.git --work-tree=project commit -a where projectPaths is a file containing the paths to all…
initlaunch
  • 467
  • 5
  • 15
17
votes
1 answer

Centos - "locate" command doesn't work

We have Centos 7. Trying to use the 'locate' command yields nothing, even if the searched file[s] actually exist. No error is printed. Also executed 'sudo updatedb' to update the 'locate' indexes. Any ideas? Thank you
user3139774
  • 1,015
  • 3
  • 12
  • 20
17
votes
1 answer

PaxHeaders in tarball

I'm doing a tar like in C, and I've got a problem. I just want to archive and unarchive files and diretory, so I operate this command : tar -cvf NAME.tar FILE1 [FILE2...] Now I'm trying to get the header POSIX of this archive : struct…
Liroo Pierre
  • 749
  • 1
  • 7
  • 23
17
votes
4 answers

Download Folder including Subfolder via wget from Dropbox link to Unix Server

I have a dropbox link like https://www.dropbox.com/sh/w4366ttcz6/AAB4kSz3adZ which opens the ususal dropbox site with folders and files. Is there any chance to download the complete content (tar or directly as sync) to a unix machine using wget? I…
user2338300
  • 173
  • 1
  • 1
  • 5
17
votes
3 answers

How to export multiple variables with same value in ksh?

I want to set the following variables to the same value in one single line Example: export A=B=C=20 There is a syntax available in 'bash' but how can I accomplish the above in ksh ?
Sathish Kumar
  • 1,180
  • 5
  • 17
  • 32
17
votes
3 answers

Analog of COM programming in Linux/UNIX

The Component Object Model (COM) is (or was...) the way in Windows to provide language-neutral software components. Is there any programming model in Linux/UNIX with the same philosophy of code reuse through binary components?
Hernán
  • 4,261
  • 2
  • 28
  • 45
17
votes
1 answer

PHP: get_current_user() vs. exec('whoami')

Short version of the question: What's the difference between get_current_user(); and exec('whoami'); ? Long version of the question: I'm on a XAMPP Localhost on a Mac. I'm using Apache, building a PHP based website in a folder (let's call it…
thanks_in_advance
  • 2,326
  • 5
  • 19
  • 39
17
votes
2 answers

How do you pipe output from a Ruby script to 'head' without getting a broken pipe error

I have a simple Ruby script that looks like this require 'csv' while line = STDIN.gets array = CSV.parse_line(line) puts array[2] end But when I try using this script in a Unix pipeline like this, I get 10 lines of output, followed by an…
dan
  • 39,098
  • 40
  • 137
  • 234
17
votes
9 answers

using bash: write bit representation of integer to file

I have a file with binary data and I need to replace a few bytes in a certain position. I've come up with the following to direct bash to the offset and show me that it found the place I want: dd bs=1 if=file iseek=24 conv=block cbs=2 |…
Max Leske
  • 4,774
  • 6
  • 40
  • 50
17
votes
1 answer

Difference between HDFS and NFS?

I am newbie on this.Would like to know about the basic differences between hadoop distributed file system and network file system and what are the benefits of hdfs over nfs?
Alok Pathak
  • 845
  • 8
  • 18
17
votes
5 answers

How to choose which version of python runs from terminal?

I have a few different versions of python on my computer. How do I choose which one is run from my terminal when I type "python" into the prompt?
mjmostachetti
  • 326
  • 1
  • 4
  • 13
1 2 3
99
100