The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
9 views

How can I set a modified PATH for a non-interactive non-login POSIX shell invoked by Scons on Cygwin?

Because I work on a number of separate projects, (each of which uses a different compiler), I don't like to have the path to any one compiler set in my PATH. Now I have joined another project where ...
0
votes
1answer
24 views

Are device IOs handled even when a device is not opened by any process?

The following shell program examples makes the question clearer. Given a simple character device (a ftdi ttyUSB device in my case), I send it a request with echo to open();write();close(); the device,...
1
vote
0answers
24 views

How can I delete every hourly backup except the 24 most recent ones?

I used to have a server with hourly/daily backups, all readily available thanks to this nice tutorial. Unfortunately, said server fried and I now have to make my backups on a NAS which doesn’t run1 my ...
0
votes
1answer
41 views

Unknown option -pthread in LD

This is a follow up from this issue on Github. Basically, on OS X El Capitan, I get this message: ld: unknown option: -pthread clang: error: linker command failed with exit code 1 (use -v to see ...
-1
votes
2answers
39 views

what does “exec 5>>foobar.txt” do?

What does the shell command exec 5>>foobar.txt do? I can't google it for obvious reasons, and otherwise not sure where to start looking.
0
votes
1answer
37 views

Passing unix shell (optional) text parameter without expansion

I want to write a unix/linux script updategit.sh with a default parameter to commit to git. updategit.sh should be POSIX compatible. I hope POSIX will solves some of worst incompatibilities of the ...
0
votes
0answers
20 views

does POSIX shell specify order of evaluation of arithmetic operands?

When executing a command such as echo $(( $(sleep 10; echo 0) + $(touch foobar.txt; echo 0) )) I observe (with current dash and bash shells) that the file foobar.txt does not appear instantaneously ...
4
votes
1answer
384 views

How to convert a Windows path (with backslashes) to Unix format on Babun/Cygwin

I'm using Windows and writing shell scripts to run on Babun (a POSIX api). I need to read a path from an environment variable, $USERPROFILE, and convert it to unix style (replace \ by /, c:\ by /c/) ...
4
votes
2answers
80 views

SUID bit on directories

In Linux there are SUID, SGID, and sticky bits for directory permission. So I am absolutely clear about the sticky and SGID bit on files or folders. What happens if I apply SUID bit on a directory? ...
0
votes
0answers
30 views

What are the -DPOSIX and -DXWINDOWS flags for in Makefiles?

I see -DPOSIX has something to do with POSIX compliancy...which I can kinda get my head around because my program uses a posix library (pthreads) but I can't dig up anything relevant on what -...
0
votes
0answers
193 views

POSIX and ACL permissions Mac Server

I have a mac mini server and have a script run at login for network users that mounts a shared drive on the mac server. When they mount up, I create a folder with their name as the folder name. What ...
1
vote
1answer
226 views

Filezilla regex for filtering out all subdir except one

I'm trying to get filezilla filtering out all the subfolder of a certain folder except one without success. My tree looks like this: css/ |--many files and dirs... js/ |--many files and dirs... ...
1
vote
1answer
133 views

Execute script on ipv6 prefix change

How can I execute a script or program whenever my (world-routeable) IPv6 prefix changes? If there is (currently) no easy way to do this, a pointer to the corresponding Posix system calls would be ...
1
vote
0answers
22 views

set ACL for BackupUser

I want to backup a whole bunch of folders from different users remotely. Therefore I created a special user that is able to log into the machine and (should) have the right to read all the files via a ...
1
vote
1answer
1k views

How to get list of process ids that are in a given group id

Going by the man page, I would expect this to work: ps ah -o pid,pgrp -G 18322 But this shows exactly the same list as without the -G arguments. I want a saner way to produce this output: ps ah -o ...
0
votes
0answers
90 views

How to make sudo with POSIX shell better?

I have made changes to my Arch Linux x86-64 system where I run bash exclusively through what I think is POSIX mode, through using /bin/sh (linked to '/bin/bash') as my login shell and instead of ...
1
vote
1answer
595 views

Windows 7 Ultimate versus Cygwin: POSIX compliance and is it practical to install a GNU system directly on Win 7 Ultimate without Cygwin

What are the advantages or disadvantages of using GNU/Linux utilities on Windows 7 via Cygwin as opposed to making use of Windows 7 Ultimate SUA (Subsystem for UNIX-based applications) support (...
0
votes
2answers
208 views

What is the smallest POSIX OS? [closed]

What is the smallest POSIX operating system that has a live CD and can be installed? ⠀It must support wifi. ⠀I only need a CLI interface.
10
votes
2answers
8k views

What is the difference between /etc/environment and /etc/profile?

I understand that the former is loaded prior to the latter, but what is the conceptual difference? Are there any good reasons I should set some variables in one and not in other? Except the fact that /...
1
vote
0answers
74 views

What''s the “earliest” place one can set an environment variable during Linux boot process?

I know I can set a variable in a shell startup file, but the thing is, I am trying to set up a POSIX-compatible environment, and a POSIX shell does not parse any startup files other than the one ...
1
vote
2answers
199 views

Documentation on “BSD General Commands”

I cringe to ask this question, but for many commands on OS-X and probably other POSIX systems, it's difficult for me to find needed documentation on the built-in commands. For example, if I want to ...
8
votes
3answers
10k views

What's the difference between SIGKILL and SIGSTOP?

The manual describes SIGKILL and SIGSTOP like this: SIGKILL 9 Term Kill signal SIGTERM 15 Term Termination signal SIGSTOP 17,19,23 Term Stop the process ...
6
votes
2answers
55 views

discover the directory that prevents a file from being read in linux

i'm getting a permission denied for a user in a really long path. $ sudo sudo -u user cat /l/o/n/g/path/file Permission denied i'm pretty sure path and file have permissions for that user. Is there ...
2
votes
2answers
206 views

OpenOffice Calc regex returns wrong value - what's wrong with my regex?

I have a column of text with values concatenated by my bank, as in a typical monthly statement. Here is an example (column A240): OCT 26 BALANCEPROTECTOR PREMIUM $10.05 I'm trying to set the ...
2
votes
1answer
161 views

Stop wget but allow convert-links

I'm running a wget command with a rather deep recursion depth. The deep recursion depth is needed to get the files I want, but I don't want to wait for the operation to complete. I see that I can ...
10
votes
4answers
4k views

bash pipe construct to prepend something to the stdoutput of previous command

I want to use sendmail to send me stuff and want to do it in a oneliner. echo "mail content" | sendmail emailataddres.com Sends it without subject. The subject line must come before the Mail ...
11
votes
4answers
4k views

Alternative to the tee command without STDOUT

I'm using | sudo tee FILENAME to be able to write or append to a file for which superuser permissions are required quite often. Although I understand why it is helpful in some situation, that tee ...
1
vote
0answers
119 views

Quick method using POSIX tools to generate a random file

So I'm using a board on a ramfs that is pretty much running a barebones Linux kernel that is pretty much just POSIX-compliant (with busybox). For some disk drive testing, I am trying to generate a ...
3
votes
2answers
252 views

What is the point of UNIX's rmdir?

I'm new to UNIX (MAC OS X bourne shell POSIX), I understand rmdir will only remove an empty directory but under what circumstances would you actually want to use rmdir <directory name> and not ...
0
votes
1answer
163 views

Mutt and msmtp interoperability

I am working on configuring /mutt/ to send mail via /msmtp/. Strangely, if I user /msmtp/ from shell, all okay, that means, that .msmtprc is correct. However, mail sent with mutt do not come. I have ...
11
votes
3answers
4k views

How to delete a file with a weird name?

I wrote a program that uses POSIX memory-mapping function (mmap) The program takes a file (a.dat) and memory-maps it for reading/writing. Due to errors in the program, every time I run the program a ...
1
vote
0answers
354 views

Why are POSIX timezones relative to UTC opposite from most others (and what's intutively correct)? [closed]

In POSIX, UTC-2 means 2 hours after UTC, and UTC+2 means 2 hours before UTC. In other words, If it's currently 8am in UTC, it's 10am in time zone UTC-2, and 6am in time zone UTC+2. This thread ...
2
votes
2answers
2k views

Executable can't find correct files when called via symbolic link

I made a symbolic link to an executable with ln -s /usr/bin/mydir/myexec /usr/bin/myexec When I executed myexec in Bash, it does not load the proper files which are located in the original myexec's ...
2
votes
0answers
540 views

List of POSIX-certified operating systems?

Where can I find a list of POSIX-certified operating systems? The official list contains just six entries.
3
votes
2answers
1k views

Unicode-based POSIX tools (other than Cygwin) for Windows?

GNU Win32 and MSYS are awesome, but it seems like all of their tools use the ANSI version of the Windows API, rather than the Unicode versions. Obviously, those are meant for Windows 95 and 98, not ...
19
votes
3answers
4k views

Why is NTFS case sensitive?

I personally thought that NTFS was case insensitive, since you can type cmd, CMD, cMd or even CmD and still get the command prompt. However, why is it that during a CHKDSK x: /f /r, sometimes it fixes ...
1
vote
1answer
252 views

If SUS exists then why there's also POSIX? [closed]

We know that to define whether the system is Unix or not there's a Single UNIX Specification(SUS) which is held by OpenGroup. Then why there's another certification as POSIX? Are these things the same?...
3
votes
3answers
211 views

Does Unix stand for any POSIX-compilant system?

When someone is saying "Unix" does it mean that it can be every POSIX-compatible system including linux distributives, solaris, freebsd etc?
4
votes
2answers
6k views

What does it mean to have a POSIX-compilant operating system?

What does it mean if the operating system is said to be POSIX-compilant?
3
votes
4answers
138 views

MacOS command-line - possible to write portable scripts across MacOS and Linux?

I've been mostly pleased with MacOS as a dev platform, and it's somewhat similar to a linux command-line, but there are a number of notable exceptions: all commands: arguments parsing behavior ...
51
votes
4answers
20k views

less is more? Is more less? I'm so confused

When I first heard their names, I got really confused when I tried to guess what these tools might do, I thought I'd misheard something. What's the difference between more and less, i.e. why ...
1
vote
2answers
127 views

How to copy file into an incrementally numbered dir?

For instance, if there is dir 3: mkdir 4; cp file 4 The dir could also be called 3 other text. Still no text needs to be in mkdir 4 besides the incremented number. The highest number needs to be ...
4
votes
5answers
611 views

Why do we use ./progname in *nix systems to execute a program?

I've been using Linux & Mac for sometime now and I always wonder - Why do we have to execute a program like ./progname . I know Unix treats every thing as a file and it stores the filename in a ...
0
votes
4answers
201 views

How to list dirs containg a file?

I'm trying to use find to list dirs with a certain file inside, but my dirs have spaces so I haven't found a solution.
2
votes
1answer
380 views

What is The POSIX standard?

In plain and simple terms, what is the posix standard and why does it matter? Also if I have two systems that are 100% posix compatible, would code compiled for one work on the other without a problem?...
1
vote
2answers
297 views

PC multi-core architecture, scheduling of cores access to system memory

My office computer has 8 cores. I recently upgraded the system from 4Gb of RAM (in two modules) to 24Gb of RAM (in six modules) and noticed a considerable increase in performance when multiple cores ...
6
votes
5answers
3k views

Standard way to duplicate a file's permissions

I am trying to find a standard POSIX way to duplicate one file's permissions to another file. On a GNU system this is easy: [alexmchale@bullfrog ~]$ ls -l hardcopy.* -rw-r--r-- 1 alexmchale users ...
0
votes
1answer
622 views

Difference between /usr/bin/login and /usr/bin/bash [duplicate]

Possible Duplicate: Differences between /usr/bin/login and /usr/bin/bash What is the difference between /usr/bin/login, and /usr/bin/bash? Does the first command something more, or different ...
1
vote
5answers
3k views

Differences between /usr/bin/login and /usr/bin/bash

Terminal.app has the setting "Shells open with:" with the option "Default login shell (/usr/bin/login)", and "Command (complete path)" that by default contains "/usr/bin/bash". The dafault option for ...
2
votes
1answer
262 views

Permissions issue Mac OS X Client -> Mac OS X Server

I can't get access to a folder on our server and can't understand why. Perhaps someone will see what I'm overlooking... Trouble accessing /Library/Subdirectory/NextDirectory/ User joe can ssh to the ...