Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
42 views

How to remove "diff -ubr dir1 dir2" from the file produced comparing dir1 and dir2 [closed]

I have two directories with the same list of files. I compared all the files present in both the directories using the "diff -ubr dir1 dir2" command,more precisely I used this form : diff -...
Marietto's user avatar
  • 161
4 votes
1 answer
120 views

Is futex essentially an unique integer? any way to expose it by user space code?

So I once learned that UNIX futex is in essence an unique integer, is this statement correct and complete? If that is true, can I somehow take advantage of it to help avoid deadlock by always locking ...
PkDrew's user avatar
  • 2,657
0 votes
1 answer
17 views

Generic/multi-FS alternative to the XFS_IOC_RESVSP64 ioctl?

The XFS filesystem has (or used to have) a IOCTL named XFS_IOC_RESVSP64 for reserving space: You called it with a given file descriptor, and the XFS driver reserved an amount of space use by for your ...
einpoklum's user avatar
  • 136k
0 votes
0 answers
55 views

PPP connection emulation

I need to create a virtual PPP connection that I can configure and capture into PCAP files. The goal is to set up a PPP link with protocol-field-compression and FCS-alternatives options in LCP (the ...
Alice Gingertail's user avatar
1 vote
1 answer
90 views

`pthread_kill` randomly send signal to the wrong thread on MacOS

I have multiple threads performing sigwait on the same signal, and the main thread will wake specific thread up via pthread_kill. On Linux the program runs fine, but on MacOS the wrong thread will be ...
Guest0x0's user avatar
  • 286
-2 votes
0 answers
45 views

Is There an Equivalent for a Unix Backtic in Windows 11? [duplicate]

In Unix one can assign a variable to dir (with backtics) and have that variable contain the output of the (dir) command. My laptop has a Windows 11 operating system. Is there any way to do something ...
KevinSim's user avatar
  • 117
2 votes
0 answers
194 views

How do I connect to my own C server from another machine on same network? [closed]

I can connect a Unix server and client socket just fine, but only if they are on the same machine. My code does not work even if they are running on separate machines connected to the same router. To ...
Jen's user avatar
  • 21
3 votes
0 answers
151 views

Read file and get the real path at the same time

In C on linux, given a file path, I'd like to read the file contents, and also I'd like to know the real path with any symlinks resolved. I can do those things separately (e.g. open() + read() for the ...
Ismail Badawi's user avatar
0 votes
2 answers
56 views

How to add in unix a field from an xml file to a different section of that same xml file

I have a problem with an xml file. It has a section called creditnotes and inside a section called items that can have one or more subsection item. My etl tool is not able to load both sections at the ...
Sergio Jimenez's user avatar
-1 votes
1 answer
60 views

Sorting text lines by a field formatted as time stamp with shell commands [closed]

I want to sort lines with time format strings using shell command. Shell shall be a common linux shell. Example input: results/fn_a:# Generated on: Mon Jul 21 17:20:48 2025 results/fn_b:# ...
Gert Gottschalk's user avatar
0 votes
1 answer
49 views

Chmod recursive on specific folder

I want to change the permissions for each subdirectory, for example the folder dodo/tata/rere/tyty/toto/ I use the chmod command with : chmod -R 777 dodo/tata/rere/tyty/toto/ but this only changes ...
Ochees's user avatar
  • 21
1 vote
2 answers
76 views

Using sed -i within a loop

I'm reformatting a big file with sample metadata. I have a file (let's call it File2) with the group each sample belong to, with one id and pop per line. My idea was to while read over that file and ...
Pedro Morell's user avatar
1 vote
2 answers
107 views

Date Comparison in UNIX Shell Script failing

I am trying to extract the file date from the output of a gsutil ls -l command and compare it to other dates. However, the comparison appears to be not working. lstr=$(gsutil ls -l gs://input-bucket/...
marie20's user avatar
  • 875
1 vote
1 answer
77 views

POSIX syscall query

I've been researching the POSIX specifications and I'm a little confused by them as to what they define as a syscall. Lets take fork() for example I know it got to be in the C library but I'm a ...
robertapengelly's user avatar
1 vote
1 answer
112 views

Python 3.12 code in USS on z/OS Mainframe - Non-UTF-8 code on Line 1 issue

I'm new to using Python on z/OS; I am creating a program in a USS directory on our mainframe and using a Rocket Software 3270 emulator; I am trying to use square brackets in my code, but as soon as I ...
Nathanael Sutherland's user avatar

15 30 50 per page
1
2 3 4 5
3174