Sponsored Content
Top Forums Shell Programming and Scripting Tar change ownership after untar Post 303045907 by sdosanjh on Friday 17th of April 2020 04:42:31 PM
Old 04-17-2020
Can anyone please help?
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

Preserving Ownership w/tar

I'm trying to make a backup of a directory tree on Solaris 8. I'm doing this with my own ID, not root. The problem I am running into is when I extract the archive, all files are owned by me and the group is my default group. The man page lists this as the default behavior when executed by a... (1 Reply)
Discussion started by: bergerj3
1 Replies

2. UNIX for Dummies Questions & Answers

Untar a TAR file at different location

Hi, I want to UNTAR a TAR file at different location. Is it possible? My TAR file contains the files with absolute path. Malay (5 Replies)
Discussion started by: malaymaru
5 Replies

3. UNIX for Advanced & Expert Users

Tar utility (untar a .tar file) on VxWorks

Hi All Can someone pls guide me if there any utility to compress file on windows & uncompress on vxworks I tried as - - compressed some folders on windows ... i created .tar ( to maintain directory structure ) and compressed to .gz format. - on VxWorks i have uncompressed it to .tar... (1 Reply)
Discussion started by: uday_01
1 Replies

4. Shell Programming and Scripting

Script to untar latest tar file

I am trying to put together a script that will check for the latest file in a directory then extract it. The extraction and the scheduling I can do, but am not sure how to get it to check for the latest file. These files are uploaded every evening by an external party and the previous days files... (3 Replies)
Discussion started by: stheologo
3 Replies

5. UNIX for Dummies Questions & Answers

tar and untar commands

I have a script to ftp, archive and delete files. I used tar command to archive files from a list and then all files were removed from name1/name2/name2/. find /name1/name2/name2/ -name "*.txt" -print > filelist.log while read line do if ; then tar cvf $tarfile $line else ... (3 Replies)
Discussion started by: Lenora2009
3 Replies

6. UNIX for Dummies Questions & Answers

untar a tar file

how can I untar a file without extracting it? sample: file.tar to file thanks, lara (1 Reply)
Discussion started by: lhareigh890
1 Replies

7. UNIX for Advanced & Expert Users

tar and untar the files using single line

Hi, i want tar the files from one location and untar it to other location using single line. Can any one help me zip and unzip using single line command. (2 Replies)
Discussion started by: venikathir
2 Replies

8. Red Hat

tar/untar over ssh

I use red hat linux. I have two linux server . I want to use tar over ssh to tar and untar the file. The server A , have IP 10.1.1.a ,there is dir a and contain files. The server B have IP 10.1.1.b , there is dir b and contain file . So, in above case ,how can I tar over ssh sunc that the file... (0 Replies)
Discussion started by: chuikingman
0 Replies

9. UNIX for Dummies Questions & Answers

How to Untar tar.gz to particular directory

Hi Guys, I am able to untar a tar.gz file. But it is again extracting the tar file to further child directory. I even tried the below command to untar it to particular directory. tar -zxvf gme_dly_sls_20120515035335.txt.tar.gz -C /sites/VSTAR/site/live/ftp/GMEUROPE I am getting the below... (4 Replies)
Discussion started by: mac4rfree
4 Replies

10. Shell Programming and Scripting

Untar only folder structure from a tar ball

I have a tar file hello.tar which is 95 GB. hello.tar has many files and folders including some tar files as well. I wish to create a new tar ball which should maintain only the folder structure of hello.tar and the tar ball within the hello.tar So basically the idea is to untar... (2 Replies)
Discussion started by: mohtashims
2 Replies
GETC_UNLOCKED(3P)					     POSIX Programmer's Manual						 GETC_UNLOCKED(3P)

PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond- ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux. NAME
getc_unlocked, getchar_unlocked, putc_unlocked, putchar_unlocked - stdio with explicit client locking SYNOPSIS
#include <stdio.h> int getc_unlocked(FILE *stream); int getchar_unlocked(void); int putc_unlocked(int c, FILE *stream); int putchar_unlocked(int c); DESCRIPTION
Versions of the functions getc(), getchar(), putc(), and putchar() respectively named getc_unlocked(), getchar_unlocked(), putc_unlocked(), and putchar_unlocked() shall be provided which are functionally equivalent to the original versions, with the exception that they are not required to be implemented in a thread-safe manner. They may only safely be used within a scope protected by flockfile() (or ftrylock- file()) and funlockfile(). These functions may safely be used in a multi-threaded program if and only if they are called while the invok- ing thread owns the ( FILE *) object, as is the case after a successful call to the flockfile() or ftrylockfile() functions. RETURN VALUE
See getc(), getchar(), putc(), and putchar(). ERRORS
See getc(), getchar(), putc(), and putchar(). The following sections are informative. EXAMPLES
None. APPLICATION USAGE
Since they may be implemented as macros, getc_unlocked() and putc_unlocked() may treat incorrectly a stream argument with side effects. In particular, getc_unlocked(*f++) and putc_unlocked(*f++) do not necessarily work as expected. Therefore, use of these functions in such sit- uations should be preceded by the following statement as appropriate: #undef getc_unlocked #undef putc_unlocked RATIONALE
Some I/O functions are typically implemented as macros for performance reasons (for example, putc() and getc()). For safety, they need to be synchronized, but it is often too expensive to synchronize on every character. Nevertheless, it was felt that the safety concerns were more important; consequently, the getc(), getchar(), putc(), and putchar() functions are required to be thread-safe. However, unlocked versions are also provided with names that clearly indicate the unsafe nature of their operation but can be used to exploit their higher performance. These unlocked versions can be safely used only within explicitly locked program regions, using exported locking primitives. In particular, a sequence such as: flockfile(fileptr); putc_unlocked('1', fileptr); putc_unlocked(' ', fileptr); fprintf(fileptr, "Line 2 "); funlockfile(fileptr); is permissible, and results in the text sequence: 1 Line 2 being printed without being interspersed with output from other threads. It would be wrong to have the standard names such as getc(), putc(), and so on, map to the "faster, but unsafe" rather than the "slower, but safe'' versions. In either case, you would still want to inspect all uses of getc(), putc(), and so on, by hand when converting exist- ing code. Choosing the safe bindings as the default, at least, results in correct code and maintains the "atomicity at the function" invariant. To do otherwise would introduce gratuitous synchronization errors into converted code. Other routines that modify the stdio ( FILE *) structures or buffers are also safely synchronized. Note that there is no need for functions of the form getc_locked(), putc_locked(), and so on, since this is the functionality of getc(), putc(), et al. It would be inappropriate to use a feature test macro to switch a macro definition of getc() between getc_locked() and getc_unlocked(), since the ISO C standard requires an actual function to exist, a function whose behavior could not be changed by the fea- ture test macro. Also, providing both the xxx_locked() and xxx_unlocked() forms leads to the confusion of whether the suffix describes the behavior of the function or the circumstances under which it should be used. Three additional routines, flockfile(), ftrylockfile(), and funlockfile() (which may be macros), are provided to allow the user to delin- eate a sequence of I/O statements that are executed synchronously. The ungetc() function is infrequently called relative to the other functions/macros so no unlocked variation is needed. FUTURE DIRECTIONS
None. SEE ALSO
getc(), getchar(), putc(), putchar(), the Base Definitions volume of IEEE Std 1003.1-2001, <stdio.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 GETC_UNLOCKED(3P)
All times are GMT -4. The time now is 11:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy