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
SEM_OPEN(3)						   BSD Library Functions Manual 					       SEM_OPEN(3)

NAME
sem_open, sem_close, sem_unlink -- named semaphore operations LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <semaphore.h> sem_t * sem_open(const char *name, int oflag, ...); int sem_close(sem_t *sem); int sem_unlink(const char *name); DESCRIPTION
The sem_open() function creates or opens the named semaphore specified by name. The returned semaphore may be used in subsequent calls to sem_getvalue(3), sem_wait(3), sem_trywait(3), sem_post(3), and sem_close(). This implementation places strict requirements on the value of name: it must begin with a slash ('/') and contain no other slash characters. The following bits may be set in the oflag argument: O_CREAT Create the semaphore if it does not already exist. The third argument to the call to sem_open() must be of type mode_t and specifies the mode for the semaphore. Only the S_IWUSR, S_IWGRP, and S_IWOTH bits are examined; it is not possible to grant only ``read'' permission on a semaphore. The mode is modified according to the process's file creation mask; see umask(2). The fourth argument must be an unsigned int and specifies the initial value for the semaphore, and must be no greater than SEM_VALUE_MAX. O_EXCL Create the semaphore if it does not exist. If the semaphore already exists, sem_open() will fail. This flag is ignored unless O_CREAT is also specified. The sem_close() function closes a named semaphore that was opened by a call to sem_open(). The sem_unlink() function removes the semaphore named name. Resources allocated to the semaphore are only deallocated when all processes that have the semaphore open close it. RETURN VALUES
If successful, the sem_open() function returns the address of the opened semaphore. If the same name argument is given to multiple calls to sem_open() by the same process without an intervening call to sem_close(), the same address is returned each time. If the semaphore cannot be opened, sem_open() returns SEM_FAILED and the global variable errno is set to indicate the error. The sem_close() and sem_unlink() functions return the value 0 if successful; otherwise the value -1 is returned and the global variable errno is set to indicate the error. ERRORS
The sem_open() function will fail if: [EACCES] The semaphore exists and the permissions specified by oflag at the time it was created deny access to this process. [EACCES] The semaphore does not exist, but permission to create it is denied. [EEXIST] O_CREAT and O_EXCL are set but the semaphore already exists. [EINTR] The call was interrupted by a signal. [EINVAL] The sem_open() operation is not supported for the given name. [EINVAL] The value argument is greater than SEM_VALUE_MAX. [ENAMETOOLONG] The name argument is too long. [ENFILE] The system limit on semaphores has been reached. [ENOENT] O_CREAT is not set but the named semaphore does not exist. [ENOSPC] There is not enough space to create the semaphore. The sem_close() function will fail if: [EINVAL] The sem argument is not a valid semaphore. The sem_unlink() function will fail if: [EACCES] Permission is denied to unlink the semaphore. [ENAMETOOLONG] The specified name is too long. [ENOENT] The named semaphore does not exist. SEE ALSO
close(2), open(2), umask(2), unlink(2), sem_getvalue(3), sem_post(3), sem_trywait(3), sem_wait(3) STANDARDS
The sem_open(), sem_close(), and sem_unlink() functions conform to ISO/IEC 9945-1:1996 (``POSIX.1''). HISTORY
Support for named semaphores first appeared in FreeBSD 5.0. BSD
January 9, 2010 BSD
All times are GMT -4. The time now is 01:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy