Debian Codegraph @

po/pl/man2/tee.2.po

raw
1 # Polish translation of manpages
2 # This file is distributed under the same license as the manpages-l10n package.
3 # Copyright © of this file:
4 # Michał Kułach <[email protected]>, 2025.
5 msgid ""
6 msgstr ""
7 "Project-Id-Version: manpages-l10n 4.26.3.1\n"
8 "POT-Creation-Date: 2026-06-05 06:48+0200\n"
9 "PO-Revision-Date: 2025-06-14 11:28+0200\n"
10 "Last-Translator: Michał Kułach <[email protected]>\n"
11 "Language-Team: Polish <[email protected]>\n"
12 "Language: pl\n"
13 "MIME-Version: 1.0\n"
14 "Content-Type: text/plain; charset=UTF-8\n"
15 "Content-Transfer-Encoding: 8bit\n"
16 "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
17 "|| n%100>=20) ? 1 : 2);\n"
18 "X-Generator: Lokalize 22.12.3\n"
19
20 #. type: TH
21 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
22 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
23 #, no-wrap
24 msgid "tee"
25 msgstr "tee"
26
27 #. type: TH
28 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
29 #: opensuse-tumbleweed
30 #, no-wrap
31 msgid "2026-02-08"
32 msgstr "8 lutego 2026 r."
33
34 #. type: TH
35 #: archlinux debian-unstable
36 #, no-wrap
37 msgid "Linux man-pages 6.18"
38 msgstr "Linux man-pages 6.18"
39
40 #. type: SH
41 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
42 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
43 #, no-wrap
44 msgid "NAME"
45 msgstr "NAZWA"
46
47 #. type: Plain text
48 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
49 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
50 msgid "tee - duplicating pipe content"
51 msgstr "tee - powiela zawartość potoku"
52
53 #. type: SH
54 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
55 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
56 #, no-wrap
57 msgid "LIBRARY"
58 msgstr "BIBLIOTEKA"
59
60 #. type: Plain text
61 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
62 #: opensuse-leap-16-1 opensuse-tumbleweed
63 msgid "Standard C library (I<libc>,\\ I<-lc>)"
64 msgstr "Standardowa biblioteka C (I<libc>,\\ I<-lc>)"
65
66 #. type: SH
67 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
68 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
69 #, no-wrap
70 msgid "SYNOPSIS"
71 msgstr "SKŁADNIA"
72
73 #. type: Plain text
74 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
75 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
76 #, no-wrap
77 msgid ""
78 "B<#define _GNU_SOURCE> /* See feature_test_macros(7) */\n"
79 "B<#include E<lt>fcntl.hE<gt>>\n"
80 msgstr ""
81 "B<#define _GNU_SOURCE> /* Patrz feature_test_macros(7) */\n"
82 "B<#include E<lt>fcntl.hE<gt>>\n"
83
84 #. type: Plain text
85 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
86 #: opensuse-leap-16-1 opensuse-tumbleweed
87 #, no-wrap
88 msgid "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<size>B<, unsigned int >I<flags>B<);>\n"
89 msgstr "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<size>B<, unsigned int >I<flags>B<);>\n"
90
91 #. Return type was long before glibc 2.7
92 #. type: SH
93 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
94 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
95 #, no-wrap
96 msgid "DESCRIPTION"
97 msgstr "OPIS"
98
99 #
100 #
101 #. Example programs http://brick.kernel.dk/snaps
102 #. add a "tee(in, out1, out2)" system call that duplicates the pages
103 #. (again, incrementing their reference count, not copying the data) from
104 #. one pipe to two other pipes.
105 #. type: Plain text
106 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
107 #: opensuse-leap-16-1 opensuse-tumbleweed
108 msgid ""
109 "B<tee>() duplicates up to I<size> bytes of data from the pipe referred to "
110 "by the file descriptor I<fd_in> to the pipe referred to by the file "
111 "descriptor I<fd_out>. It does not consume the data that is duplicated from "
112 "I<fd_in>; therefore, that data can be copied by a subsequent B<splice>(2)."
113 msgstr ""
114 "B<tee>() powiela maksymalnie I<size> bajtów danych z potoku, do którego "
115 "odnosi się deskryptor pliku I<fd_in>, do potoku, do którego odnosi się "
116 "deskryptor pliku I<fd_out>. Nie konsumuje danych duplikowanych z I<fd_in>, "
117 "zatem dane te można skopiować kolejnym wywołaniem B<splice>(2)."
118
119 #. type: Plain text
120 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
121 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
122 msgid ""
123 "I<flags> is a bit mask that is composed by ORing together zero or more of "
124 "the following values:"
125 msgstr ""
126 "I<flags> jest maską bitową tworzoną jako suma logiczna (OR) zera lub "
127 "większej liczby następujących wartości:"
128
129 #. type: TP
130 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
131 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
132 #, no-wrap
133 msgid "B<SPLICE_F_MOVE>"
134 msgstr "B<SPLICE_F_MOVE>"
135
136 #. type: Plain text
137 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
138 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
139 msgid "Currently has no effect for B<tee>(); see B<splice>(2)."
140 msgstr "Obecnie nie wpływa na B<tee>(); zob. B<splice>(2)."
141
142 #. type: TP
143 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
144 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
145 #, no-wrap
146 msgid "B<SPLICE_F_NONBLOCK>"
147 msgstr "B<SPLICE_F_NONBLOCK>"
148
149 #. type: Plain text
150 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
151 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
152 msgid "Do not block on I/O; see B<splice>(2) for further details."
153 msgstr ""
154 "Nie blokuje wejścia/wyjścia; więcej informacji w podręczniku B<splice>(2)."
155
156 #. type: TP
157 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
158 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
159 #, no-wrap
160 msgid "B<SPLICE_F_MORE>"
161 msgstr "B<SPLICE_F_MORE>"
162
163 #. type: Plain text
164 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
165 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
166 msgid ""
167 "Currently has no effect for B<tee>(), but may be implemented in the future; "
168 "see B<splice>(2)."
169 msgstr ""
170 "Obecnie nie wpływa na B<tee>(), lecz może być zaimplementowane w "
171 "przyszłości; zob. B<splice>(2)."
172
173 #. type: TP
174 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
175 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
176 #, no-wrap
177 msgid "B<SPLICE_F_GIFT>"
178 msgstr "B<SPLICE_F_GIFT>"
179
180 #. type: Plain text
181 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
182 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
183 msgid "Unused for B<tee>(); see B<vmsplice>(2)."
184 msgstr "Nieużywane w B<tee>(); zob. B<vmsplice>(2)."
185
186 #. type: SH
187 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
188 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
189 #, no-wrap
190 msgid "RETURN VALUE"
191 msgstr "WARTOŚĆ ZWRACANA"
192
193 #. type: Plain text
194 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
195 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
196 msgid ""
197 "Upon successful completion, B<tee>() returns the number of bytes that were "
198 "duplicated between the input and output. A return value of 0 means that "
199 "there was no data to transfer, and it would not make sense to block, because "
200 "there are no writers connected to the write end of the pipe referred to by "
201 "I<fd_in>."
202 msgstr ""
203 "Po pomyślnym zakończeniu, B<tee>() zwraca liczbę zduplikowanych między "
204 "wejściem i wyjściem bajtów. Zwracana wartość 0 oznacza, że nie wystąpiły "
205 "dane do przetransferowania, zatem blokowanie nie miało sensu, ponieważ do "
206 "końca do zapisu potoku, do którego odnosi się I<fd_in>, nie było "
207 "zapisujących."
208
209 #. type: Plain text
210 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
211 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
212 msgid ""
213 "On error, B<tee>() returns -1 and I<errno> is set to indicate the error."
214 msgstr ""
215 "W razie wystąpienia błędu B<tee> zwraca -1 i ustawia I<errno>, wskazując "
216 "błąd."
217
218 #. type: SH
219 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
220 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
221 #, no-wrap
222 msgid "ERRORS"
223 msgstr "BŁĘDY"
224
225 #. type: TP
226 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
227 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
228 #, no-wrap
229 msgid "B<EAGAIN>"
230 msgstr "B<EAGAIN>"
231
232 #. type: Plain text
233 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
234 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
235 msgid ""
236 "B<SPLICE_F_NONBLOCK> was specified in I<flags> or one of the file "
237 "descriptors had been marked as nonblocking (B<O_NONBLOCK>)B<,> and the "
238 "operation would block."
239 msgstr ""
240 "We I<flags> podano B<SPLICE_F_NONBLOCK> lub jeden z deskryptorów plików "
241 "oznaczono jako nieblokujący (B<O_NONBLOCK>), natomiast operacja "
242 "spowodowałaby blokowanie."
243
244 #. type: TP
245 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
246 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
247 #, no-wrap
248 msgid "B<EINVAL>"
249 msgstr "B<EINVAL>"
250
251 #. type: Plain text
252 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
253 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
254 msgid ""
255 "I<fd_in> or I<fd_out> does not refer to a pipe; or I<fd_in> and I<fd_out> "
256 "refer to the same pipe."
257 msgstr ""
258 "I<fd_in> lub I<fd_out> nie odnoszą się do potoku; albo I<fd_in> i I<fd_out> "
259 "odnoszą się do tego samego potoku."
260
261 #. type: TP
262 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
263 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
264 #, no-wrap
265 msgid "B<ENOMEM>"
266 msgstr "B<ENOMEM>"
267
268 #. type: Plain text
269 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
270 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
271 msgid "Out of memory."
272 msgstr "Brak pamięci."
273
274 #. type: SH
275 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
276 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
277 #, no-wrap
278 msgid "STANDARDS"
279 msgstr "STANDARDY"
280
281 #. type: Plain text
282 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
283 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
284 msgid "Linux."
285 msgstr "Linux."
286
287 #. type: SH
288 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
289 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
290 #, no-wrap
291 msgid "HISTORY"
292 msgstr "HISTORIA"
293
294 #. type: Plain text
295 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
296 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
297 msgid "Linux 2.6.17, glibc 2.5."
298 msgstr "Linux 2.6.17, glibc 2.5."
299
300 #. type: SH
301 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
302 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
303 #, no-wrap
304 msgid "NOTES"
305 msgstr "UWAGI"
306
307 #. type: Plain text
308 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
309 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
310 msgid ""
311 "Conceptually, B<tee>() copies the data between the two pipes. In reality "
312 "no real data copying takes place though: under the covers, B<tee>() assigns "
313 "data to the output by merely grabbing a reference to the input."
314 msgstr ""
315 "Kopiowanie danych pomiędzy potokami przez B<tee>() jest tylko konceptem. Tak "
316 "naprawdę nie dochodzi do kopiowania: za kulisami B<tee>() przypisuje dane z "
317 "wyjścia, jedynie przez przechwycenie odniesienia do wejścia."
318
319 #. type: SH
320 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
321 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
322 #, no-wrap
323 msgid "EXAMPLES"
324 msgstr "PRZYKŁADY"
325
326 #. type: Plain text
327 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
328 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
329 msgid ""
330 "The example below implements a basic B<tee>(1) program using the B<tee>() "
331 "system call. Here is an example of its use:"
332 msgstr ""
333 "Poniższy przykład implementuje prosty program B<tee>(1) za pomocą wywołania "
334 "systemowego B<tee>(). Oto przykład jego użycia:"
335
336 #. type: Plain text
337 #: archlinux debian-unstable mageia-cauldron opensuse-leap-16-1
338 #: opensuse-tumbleweed
339 #, no-wrap
340 msgid ""
341 "$B< date | ./a.out out.log | cat>;\n"
342 "Tue Oct 28 10:06:00 CET 2014\n"
343 "$B< cat out.log>;\n"
344 "Tue Oct 28 10:06:00 CET 2014\n"
345 msgstr ""
346 "$B< date | ./a.out out.log | cat>;\n"
347 "wto, 28 paź 2014, 10:06:00 CET\n"
348 "$B< cat out.log>;\n"
349 "wto, 28 paź 2014, 10:06:00 CET\n"
350
351 #. type: SS
352 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
353 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
354 #, no-wrap
355 msgid "Program source"
356 msgstr "Kod źródłowy programu"
357
358 #. type: Plain text
359 #: archlinux debian-unstable fedora-44 fedora-rawhide mageia-cauldron
360 #: opensuse-leap-16-1 opensuse-tumbleweed
361 #, no-wrap
362 msgid ""
363 "#define _GNU_SOURCE\n"
364 "#include E<lt>errno.hE<gt>\n"
365 "#include E<lt>fcntl.hE<gt>\n"
366 "#include E<lt>limits.hE<gt>\n"
367 "#include E<lt>stdio.hE<gt>\n"
368 "#include E<lt>stdlib.hE<gt>\n"
369 "#include E<lt>sys/types.hE<gt>\n"
370 "#include E<lt>unistd.hE<gt>\n"
371 "\\&\n"
372 "int\n"
373 "main(int argc, char *argv[])\n"
374 "{\n"
375 " int fd;\n"
376 " ssize_t size, ssize;\n"
377 "\\&\n"
378 " if (argc != 2) {\n"
379 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\[rs]n\", argv[0]);\n"
380 " exit(EXIT_FAILURE);\n"
381 " }\n"
382 "\\&\n"
383 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
384 " if (fd == -1) {\n"
385 " perror(\"open\");\n"
386 " exit(EXIT_FAILURE);\n"
387 " }\n"
388 "\\&\n"
389 " for (;;) {\n"
390 " /*\n"
391 " * tee stdin to stdout.\n"
392 " */\n"
393 " size = tee(STDIN_FILENO, STDOUT_FILENO,\n"
394 " INT_MAX, SPLICE_F_NONBLOCK);\n"
395 " if (size E<lt> 0) {\n"
396 " if (errno == EAGAIN)\n"
397 " continue;\n"
398 " perror(\"tee\");\n"
399 " exit(EXIT_FAILURE);\n"
400 " }\n"
401 " if (size == 0)\n"
402 " break;\n"
403 "\\&\n"
404 " /*\n"
405 " * Consume stdin by splicing it to a file.\n"
406 " */\n"
407 " while (size E<gt> 0) {\n"
408 " ssize = splice(STDIN_FILENO, NULL, fd, NULL,\n"
409 " size, SPLICE_F_MOVE);\n"
410 " if (ssize E<lt> 0) {\n"
411 " perror(\"splice\");\n"
412 " exit(EXIT_FAILURE);\n"
413 " }\n"
414 " size -= ssize;\n"
415 " }\n"
416 " }\n"
417 "\\&\n"
418 " close(fd);\n"
419 " exit(EXIT_SUCCESS);\n"
420 "}\n"
421 msgstr ""
422 "#define _GNU_SOURCE\n"
423 "#include E<lt>errno.hE<gt>\n"
424 "#include E<lt>fcntl.hE<gt>\n"
425 "#include E<lt>limits.hE<gt>\n"
426 "#include E<lt>stdio.hE<gt>\n"
427 "#include E<lt>stdlib.hE<gt>\n"
428 "#include E<lt>sys/types.hE<gt>\n"
429 "#include E<lt>unistd.hE<gt>\n"
430 "\\&\n"
431 "int\n"
432 "main(int argc, char *argv[])\n"
433 "{\n"
434 " int fd;\n"
435 " ssize_t size, ssize;\n"
436 "\\&\n"
437 " if (argc != 2) {\n"
438 " fprintf(stderr, \"Użycie: %s E<lt>plikE<gt>\\[rs]n\", argv[0]);\n"
439 " exit(EXIT_FAILURE);\n"
440 " }\n"
441 "\\&\n"
442 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
443 " if (fd == -1) {\n"
444 " perror(\"open\");\n"
445 " exit(EXIT_FAILURE);\n"
446 " }\n"
447 "\\&\n"
448 " for (;;) {\n"
449 " /*\n"
450 " * Użyj tee ze standardowego wejścia do st. wyjścia.\n"
451 " */\n"
452 " size = tee(STDIN_FILENO, STDOUT_FILENO,\n"
453 " INT_MAX, SPLICE_F_NONBLOCK);\n"
454 " if (size E<lt> 0) {\n"
455 " if (errno == EAGAIN)\n"
456 " continue;\n"
457 " perror(\"tee\");\n"
458 " exit(EXIT_FAILURE);\n"
459 " }\n"
460 " if (size == 0)\n"
461 " break;\n"
462 "\\&\n"
463 " /*\n"
464 " * Skonsumuj st. wejście dokonując splice do pliku.\n"
465 " */\n"
466 " while (size E<gt> 0) {\n"
467 " ssize = splice(STDIN_FILENO, NULL, fd, NULL,\n"
468 " size, SPLICE_F_MOVE);\n"
469 " if (ssize E<lt> 0) {\n"
470 " perror(\"splice\");\n"
471 " exit(EXIT_FAILURE);\n"
472 " }\n"
473 " size -= ssize;\n"
474 " }\n"
475 " }\n"
476 "\\&\n"
477 " close(fd);\n"
478 " exit(EXIT_SUCCESS);\n"
479 "}\n"
480
481 #. SRC END
482 #. type: SH
483 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
484 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
485 #, no-wrap
486 msgid "SEE ALSO"
487 msgstr "ZOBACZ TAKŻE"
488
489 #. type: Plain text
490 #: archlinux debian-trixie debian-unstable fedora-44 fedora-rawhide
491 #: mageia-cauldron opensuse-leap-16-1 opensuse-tumbleweed
492 msgid "B<splice>(2), B<vmsplice>(2), B<pipe>(7)"
493 msgstr "B<splice>(2), B<vmsplice>(2), B<pipe>(7)"
494
495 #. type: TH
496 #: debian-trixie
497 #, no-wrap
498 msgid "2024-06-15"
499 msgstr "15 czerwca 2024 r."
500
501 #. type: TH
502 #: debian-trixie
503 #, no-wrap
504 msgid "Linux man-pages 6.9.1"
505 msgstr "Linux man-pages 6.9.1"
506
507 #. type: Plain text
508 #: debian-trixie
509 msgid "Standard C library (I<libc>, I<-lc>)"
510 msgstr "Standardowa biblioteka C (I<libc>, I<-lc>)"
511
512 #. type: Plain text
513 #: debian-trixie
514 #, no-wrap
515 msgid "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
516 msgstr "B<ssize_t tee(int >I<fd_in>B<, int >I<fd_out>B<, size_t >I<len>B<, unsigned int >I<flags>B<);>\n"
517
518 #
519 #
520 #. Example programs http://brick.kernel.dk/snaps
521 #. add a "tee(in, out1, out2)" system call that duplicates the pages
522 #. (again, incrementing their reference count, not copying the data) from
523 #. one pipe to two other pipes.
524 #. type: Plain text
525 #: debian-trixie
526 msgid ""
527 "B<tee>() duplicates up to I<len> bytes of data from the pipe referred to by "
528 "the file descriptor I<fd_in> to the pipe referred to by the file descriptor "
529 "I<fd_out>. It does not consume the data that is duplicated from I<fd_in>; "
530 "therefore, that data can be copied by a subsequent B<splice>(2)."
531 msgstr ""
532 "B<tee>() powiela maksymalnie I<len> bajtów danych z potoku, do którego "
533 "odnosi się deskryptor pliku I<fd_in>, do potoku, do którego odnosi się "
534 "deskryptor pliku I<fd_out>. Nie konsumuje danych duplikowanych z I<fd_in>, "
535 "zatem dane te można skopiować kolejnym wywołaniem B<splice>(2)."
536
537 #. type: Plain text
538 #: debian-trixie fedora-44 fedora-rawhide
539 #, no-wrap
540 msgid ""
541 "$ B<date | ./a.out out.log | cat>\n"
542 "Tue Oct 28 10:06:00 CET 2014\n"
543 "$ B<cat out.log>\n"
544 "Tue Oct 28 10:06:00 CET 2014\n"
545 msgstr ""
546 "$ B<date | ./a.out out.log | cat>\n"
547 "wto, 28 paź 2014, 10:06:00 CET\n"
548 "$ B<cat out.log>\n"
549 "wto, 28 paź 2014, 10:06:00 CET\n"
550
551 #. type: Plain text
552 #: debian-trixie
553 #, no-wrap
554 msgid ""
555 "#define _GNU_SOURCE\n"
556 "#include E<lt>errno.hE<gt>\n"
557 "#include E<lt>fcntl.hE<gt>\n"
558 "#include E<lt>limits.hE<gt>\n"
559 "#include E<lt>stdio.hE<gt>\n"
560 "#include E<lt>stdlib.hE<gt>\n"
561 "#include E<lt>sys/types.hE<gt>\n"
562 "#include E<lt>unistd.hE<gt>\n"
563 "\\&\n"
564 "int\n"
565 "main(int argc, char *argv[])\n"
566 "{\n"
567 " int fd;\n"
568 " ssize_t len, slen;\n"
569 "\\&\n"
570 " if (argc != 2) {\n"
571 " fprintf(stderr, \"Usage: %s E<lt>fileE<gt>\\[rs]n\", argv[0]);\n"
572 " exit(EXIT_FAILURE);\n"
573 " }\n"
574 "\\&\n"
575 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
576 " if (fd == -1) {\n"
577 " perror(\"open\");\n"
578 " exit(EXIT_FAILURE);\n"
579 " }\n"
580 "\\&\n"
581 " for (;;) {\n"
582 " /*\n"
583 " * tee stdin to stdout.\n"
584 " */\n"
585 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
586 " INT_MAX, SPLICE_F_NONBLOCK);\n"
587 " if (len E<lt> 0) {\n"
588 " if (errno == EAGAIN)\n"
589 " continue;\n"
590 " perror(\"tee\");\n"
591 " exit(EXIT_FAILURE);\n"
592 " }\n"
593 " if (len == 0)\n"
594 " break;\n"
595 "\\&\n"
596 " /*\n"
597 " * Consume stdin by splicing it to a file.\n"
598 " */\n"
599 " while (len E<gt> 0) {\n"
600 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
601 " len, SPLICE_F_MOVE);\n"
602 " if (slen E<lt> 0) {\n"
603 " perror(\"splice\");\n"
604 " exit(EXIT_FAILURE);\n"
605 " }\n"
606 " len -= slen;\n"
607 " }\n"
608 " }\n"
609 "\\&\n"
610 " close(fd);\n"
611 " exit(EXIT_SUCCESS);\n"
612 "}\n"
613 msgstr ""
614 "#define _GNU_SOURCE\n"
615 "#include E<lt>errno.hE<gt>\n"
616 "#include E<lt>fcntl.hE<gt>\n"
617 "#include E<lt>limits.hE<gt>\n"
618 "#include E<lt>stdio.hE<gt>\n"
619 "#include E<lt>stdlib.hE<gt>\n"
620 "#include E<lt>sys/types.hE<gt>\n"
621 "#include E<lt>unistd.hE<gt>\n"
622 "\\&\n"
623 "int\n"
624 "main(int argc, char *argv[])\n"
625 "{\n"
626 " int fd;\n"
627 " ssize_t len, slen;\n"
628 "\\&\n"
629 " if (argc != 2) {\n"
630 " fprintf(stderr, \"Użycie: %s E<lt>plikE<gt>\\[rs]n\", argv[0]);\n"
631 " exit(EXIT_FAILURE);\n"
632 " }\n"
633 "\\&\n"
634 " fd = open(argv[1], O_WRONLY | O_CREAT | O_TRUNC, 0644);\n"
635 " if (fd == -1) {\n"
636 " perror(\"open\");\n"
637 " exit(EXIT_FAILURE);\n"
638 " }\n"
639 "\\&\n"
640 " for (;;) {\n"
641 " /*\n"
642 " * Użyj tee ze standardowego wejścia do st. wyjścia.\n"
643 " */\n"
644 " len = tee(STDIN_FILENO, STDOUT_FILENO,\n"
645 " INT_MAX, SPLICE_F_NONBLOCK);\n"
646 " if (len E<lt> 0) {\n"
647 " if (errno == EAGAIN)\n"
648 " continue;\n"
649 " perror(\"tee\");\n"
650 " exit(EXIT_FAILURE);\n"
651 " }\n"
652 " if (len == 0)\n"
653 " break;\n"
654 "\\&\n"
655 " /*\n"
656 " * Skonsumuj st. wejście dokonując splice do pliku.\n"
657 " */\n"
658 " while (len E<gt> 0) {\n"
659 " slen = splice(STDIN_FILENO, NULL, fd, NULL,\n"
660 " len, SPLICE_F_MOVE);\n"
661 " if (slen E<lt> 0) {\n"
662 " perror(\"splice\");\n"
663 " exit(EXIT_FAILURE);\n"
664 " }\n"
665 " len -= slen;\n"
666 " }\n"
667 " }\n"
668 "\\&\n"
669 " close(fd);\n"
670 " exit(EXIT_SUCCESS);\n"
671 "}\n"
672
673 #. type: TH
674 #: fedora-44 fedora-rawhide
675 #, no-wrap
676 msgid "2024-11-17"
677 msgstr "17 listopada 2024 r."
678
679 #. type: TH
680 #: fedora-44 fedora-rawhide
681 #, no-wrap
682 msgid "Linux man-pages 6.13"
683 msgstr "Linux man-pages 6.13"
684
685 #. type: TH
686 #: mageia-cauldron
687 #, no-wrap
688 msgid "Linux man-pages 6.17"
689 msgstr "Linux man-pages 6.17"
690
691 #. type: TH
692 #: opensuse-leap-16-1 opensuse-tumbleweed
693 #, no-wrap
694 msgid "Linux man-pages (unreleased)"
695 msgstr "Linux man-pages (niewydane)"