02-17-2009
touch and permission
Hi All,
I have requirement to give permission to empty file. I do it in two steps.
But is it possible using touch command with some option for providing permission for a file.
Regards,
gehlnar
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I would like to "touch" all of the files in all of my directories.
Instead of typing touch *.* in each directory, how would have unix touch all files in all of my directories?
Thanks!! (1 Reply)
Discussion started by: a025321
1 Replies
2. Shell Programming and Scripting
hello
what is the difference between :
touch /home/toto
and
> /home/toto
thank you (5 Replies)
Discussion started by: pascalbout
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
This might be the stupidest question ever but here it goes, i need to create a file with the name Hello! It's $s It using the touch command
but whenever i use
touch 'Hello! It's $s'
i get s is undefined
touch Hello! It's $s
i get ' unmatched
Please help ^_^ (6 Replies)
Discussion started by: wsn
6 Replies
4. Shell Programming and Scripting
why am i unable to change the timestamp on a file
I'm getting the following error on AIX.
touch: cannot change times
Any help is appreciated.
Regards,
Ram. (4 Replies)
Discussion started by: ramky79
4 Replies
5. UNIX for Dummies Questions & Answers
I have a folder with many subdirectories and i need to set the modified date to today for everything in it. Please help, thanks!
I tried something i found online, find . -print0 | xargs -r0 touch
but I got the error: xargs: illegal option -- r (5 Replies)
Discussion started by: glev2005
5 Replies
6. Shell Programming and Scripting
I need to change the modified time to below time , but can't get through using touch
Nov 27 10:16 (2 Replies)
Discussion started by: dinjo_jo
2 Replies
7. UNIX for Dummies Questions & Answers
Is there a way to do...
touch ./config/newdir/newfile
if neither newdir and newfile exists?
man touch tells me there's not (?)
Is out there another tool to do that?
Thx in advance! :b: (6 Replies)
Discussion started by: funyotros
6 Replies
8. Shell Programming and Scripting
Hi all
I changed some of my files in my hoem directory to old dates using the touch command like this
touch -t 200805101024 file name
but after using this command the date changed properly but it displays like below
-rwxr--r-- 1 fincntrg fingrp 193619 May 10 2008 vi.pdf
I... (3 Replies)
Discussion started by: thelakbe
3 Replies
9. UNIX for Advanced & Expert Users
Hello,
I am trying to use touch command to create 1200 .txt files. I am using this, but it is not working.
touch `seq 1 1200`.txt
Regards,
Siddhesh.K (5 Replies)
Discussion started by: Siddheshk
5 Replies
10. Shell Programming and Scripting
Hi,
There are 2 users (T886072 & T864764) that need to be provided full (rwx) access to a directory. I made the changes to the directory permissions using chmod and setfacl :
root@digidb2:# chmod 700 /u02/ftpfiles/MFRS16/discount_rates/
root@digidb2:# setfacl -s... (3 Replies)
Discussion started by: anaigini45
3 Replies
LEARN ABOUT CENTOS
acl_get_perm
ACL_GET_PERM(3) BSD Library Functions Manual ACL_GET_PERM(3)
NAME
acl_get_perm -- test for a permission in an ACL permission set
LIBRARY
Linux Access Control Lists library (libacl, -lacl).
SYNOPSIS
#include <sys/types.h>
#include <acl/libacl.h>
int
acl_get_perm(acl_permset_t permset_d, acl_perm_t perm);
DESCRIPTION
The acl_get_perm() function tests if the permission specified by the argument perm is contained in the ACL permission set pointed to by the
argument permset_d.
Any existing descriptors that refer to permset_d continue to refer to that permission set.
RETURN VALUE
If successful, the acl_get_perm() function returns 1 if the permission specified by perm is contained in the ACL permission set permset_d,
and 0 if the permission is not contained in the permission set. Otherwise, the value -1 is returned and the global variable errno is set to
indicate the error.
ERRORS
If any of the following conditions occur, the acl_get_perm() function returns -1 and sets errno to the corresponding value:
[EINVAL] The argument permset_d is not a valid descriptor for a permission set within an ACL entry.
The argument perm is not a valid acl_perm_t value.
STANDARDS
This is a non-portable, Linux specific extension to the ACL manipulation functions defined in IEEE Std 1003.1e draft 17 ("POSIX.1e", aban-
doned).
SEE ALSO
acl_add_perm(3), acl_clear_perms(3), acl_delete_perm(3), acl_get_permset(3), acl_set_permset(3), acl(5)
AUTHOR
Written by Andreas Gruenbacher <a.gruenbacher@bestbits.at>.
Linux ACL March 23, 2002 Linux ACL