Questions tagged [posix]

POSIX stands for Portable Operating System Interface. It’s a family of standards specified by IEEE for maintaining compatibility among operating systems.

85 questions
65
votes
5 answers

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 should I choose one over the other? They both seem to…
user541686
  • 23,629
62
votes
9 answers

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 also sends its input to STDOUT again, I never ever…
aef
  • 1,502
  • 4
  • 18
  • 20
61
votes
2 answers

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 difference in their purpose and otherwise? Are there any good reasons I should set some variables in one and not the other? What little I understand is that /etc/environment…
53
votes
3 answers

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 file with some weird names (e.g.,…
A. K.
  • 665
35
votes
5 answers

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 content, so I am looking for something along the lines…
AndreasT
  • 769
29
votes
3 answers

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 and states: The signals SIGKILL and SIGSTOP…
qdii
  • 1,107
28
votes
3 answers

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 capitalization in some files? If it didn't care…
Canadian Luke
  • 24,640
19
votes
2 answers

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

What does it mean if the operating system is said to be POSIX-compliant?
Sergey
  • 1,755
17
votes
1 answer

SUID bit on directories

In Linux there are SUID, SGID, and sticky bits for directory permissions. I am absolutely clear about the sticky and SGID bit on files or folders. But what happens if I apply SUID bit on a directory? For example, if I apply a SGID bit on a file, a…
TheMAn
  • 183
13
votes
5 answers
13
votes
6 answers

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 2972 Jul 8 20:40 hardcopy.1 ---------- 1 alexmchale…
Alex
  • 735
9
votes
3 answers

does PATH search include symlinks?

The POSIX shell standard says on this site http://pubs.opengroup.org/onlinepubs/9699919799/ about how shells use PATH to look for executables: "The list shall be searched from beginning to end, applying the filename to each prefix, until an…
8
votes
2 answers

Script to convert ext4 filenames to NTFS

ext4 allows certain chars in filenames which NTFS doesn't. Is there a script to replace those chars in filenames?
8
votes
1 answer

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/) so I can use it later in the script. The problem…
7
votes
2 answers

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 any easy way to find which of the other…
gcb
  • 5,442
  • 13
  • 62
  • 86
1
2 3 4 5 6