Questions tagged [concurrency]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
16
votes
3answers
8k views

tee + cat: use an output several times and then concatenate results

If I call some command, for instance an echo I can use the results from that command in several other commands with tee. Example: echo "Hello world!" | tee >(command1) >(command2) >(command3)...
19
votes
1answer
12k views

Is using rsync while source is being updated safe?

Is it safe to use rsync when the source filesystem is mounted and writeable, assuming that it may very well be modified while rsync is running? I presume that under race conditions I may not get the ...
32
votes
4answers
36k views

How to launch a set of program inside tmux or gnome-terminal within a script?

I wanted to launch a few commands simultaneously in tmux or gnome-terminal or xfterminal , every different tab with a single command running , and close that tab when that command finishes. Any ...
4
votes
1answer
2k views

Multiple appenders writing to the same file on NFS share

If I have 100 servers execute a command, and each redirects their output to the same file on an NFS share, will the resultant file be interleaved neatly or can it become corrupt? For example, if this ...
3
votes
1answer
538 views

How can the order of execution in the shell as it relates to redirection be upset about 1 time out of a 1000 on my system? [duplicate]

Considering this Q&A about the order of execution in the shell as it relates to redirection, and despite the fact that if a file doesn't exist it gets created first so that cat example.txt | shuf &...
5
votes
1answer
1k views

Are pipe reads not greater than PIPE_BUF atomic?

The GNU C library manual briefly mentioned that both reads and writes for a pipe are atomic Reading or writing pipe data is atomic if the size of data written is not greater than PIPE_BUF. However,...
2
votes
1answer
738 views

Will an `unlink` or `rename` portably and atomically make a `link` fail?

Question Suppose I have some non-directory (file, named pipe/socket, whatever) at the pathname /tmp/foo and some other non-directory at the pathname /tmp/bar. Then two (or more) processes start ...
2
votes
1answer
821 views

Does linux tar block write access to files

I have a large (>10GB) folder full of images on a live webserver that I need to back up and transfer. I'm worried that if I tar the folder, the files will be blocked for reading by the webserver, ...