01-06-2002
Sorry for the trial and error, but if you change the tr command to one of the following, I'm pretty sure it will work for you:
tr ["\-rwx"] ["0421"]
tr ["rwx\-"] ["4210"]
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
when i list the content of a directory
date informations are also listed (ls -ltr)
for included files and directories.
for example: i see the date Jun 29 14:43
for one of the included directory,
but when i look into the files contained in
this directory i cannot see any file with this... (1 Reply)
Discussion started by: gfhgfnhhn
1 Replies
2. UNIX for Dummies Questions & Answers
hi,
say I have
dirA/file1
dirB/file2
and I tar them up, and then do
zcat Tar.tar | tar tvf -
Sometimes I will see:
dirA/
dirA/file1
dirB/
dirB/file2
yet other times I will see (4 Replies)
Discussion started by: JamesByars
4 Replies
3. UNIX for Dummies Questions & Answers
Hello All,
Got a question to make a script what reads a directory and put the file names from that directory in a file with some extra text.
ls /tempdir
output is:
file1.gfh
file2.txt
file4.zzz
these file names (always with an extention) must be placed in a line and written to... (2 Replies)
Discussion started by: ToXiQ
2 Replies
4. Shell Programming and Scripting
Hi all,
Have to generate an xml having information related to files in the directory
Suppose i have file
file1.xml (datafile)
file2.xml (datafile)
file3.xml (metafile)
Now i need to generate an xml in the format >>
<?xml version="1.0" encoding="UTF-8"?>
<AuditFile Version="2.0">... (8 Replies)
Discussion started by: abhinav192
8 Replies
5. Shell Programming and Scripting
Hi
i have a single line xml file having many account no tag, from which i need only the account no from the tag. any one can help on this.
below is the xml file:
... (2 Replies)
Discussion started by: Saravanapk
2 Replies
6. Shell Programming and Scripting
Hi to all,
I got this content/pattern from file http.log.20110808.gz
mail1 httpd: Account Notice: close igchung@abc.com 2011/8/7 7:37:36 0:00:03 0 0 1
mail1 httpd: Account Information: login sastria9@abc.com proxy sid=gFp4DLm5HnU
mail1 httpd: Account Notice: close sastria9@abc.com... (16 Replies)
Discussion started by: Mr_47
16 Replies
7. Shell Programming and Scripting
Hi
I am trying to extract information out of a file but keep getting grep cant open errors
the code is below:
#bash
#extract orders with blank address details
#
# obtain the current date
# set today to the current date ccyymmdd format
today=`date +%c%m%d | cut -c24-31`
echo... (8 Replies)
Discussion started by: Bruble
8 Replies
8. UNIX for Dummies Questions & Answers
I need my code to compare two different files that are in two completely different directories, How can I do this?
So for example, my code will look at file1 which is in my home directory, and compare the files with those from file2 that is in /abc/adf/adr/afc/adf/file2... does that make sense? (1 Reply)
Discussion started by: castrojc
1 Replies
9. UNIX for Dummies Questions & Answers
I have a flat file that looks like this, let's call it Chromosome_9.txt:
FT /Gene_Name="Guanyl-Acetylase 9"
FT /Gene_Number"36952"
FT /Gene_Name="Endoplasmic Luciferase"
FT /Gene_Number"36953"
FT ... (4 Replies)
Discussion started by: Twinklefingers
4 Replies
10. Shell Programming and Scripting
Hi Gurus,
I am SQL developer and new unix user.
I need to create some file and file content based on information in two files.
I have one file contains basic information below file1 and another exception file file2. the rule is if "zone' and "cd" in file1 exists in file2, then file name is... (13 Replies)
Discussion started by: Torhong
13 Replies
CHACL(1) Access Control Lists CHACL(1)
NAME
chacl - change the access control list of a file or directory
SYNOPSIS
chacl acl pathname...
chacl -b acl dacl pathname...
chacl -d dacl pathname...
chacl -R pathname...
chacl -D pathname...
chacl -B pathname...
chacl -l pathname...
chacl -r pathname...
DESCRIPTION
chacl is an IRIX-compatibility command, and is maintained for those users who are familiar with its use from either XFS or IRIX. Refer to
the SEE ALSO section below for a description of tools which conform more closely to the (withdrawn draft) POSIX 1003.1e standard which
describes Access Control Lists (ACLs).
chacl changes the ACL(s) for a file or directory. The ACL(s) specified are applied to each file in the pathname arguments.
Each ACL is a string which is interpreted using the acl_from_text(3) routine. These strings are made up of comma separated clauses each of
which is of the form, tag:name:perm. Where tag can be:
"user" (or "u")
indicating that the entry is a user ACL entry.
"group" (or "g")
indicating that the entry is a group ACL entry.
"other" (or "o")
indicating that the entry is an other ACL entry.
"mask" (or "m")
indicating that the entry is a mask ACL entry.
name is a string which is the user or group name for the ACL entry. A null name in a user or group ACL entry indicates the file's owner or
file's group. perm is the string "rwx" where each of the entries may be replaced by a "-" indicating no access of that type, e.g. "r-x",
"--x", "---".
OPTIONS
-b Indicates that there are two ACLs to change, the first is the file access ACL and the second the directory default ACL.
-d Used to set only the default ACL of a directory.
-R Removes the file access ACL only.
-D Removes directory default ACL only.
-B Remove all ACLs.
-l Lists the access ACL and possibly the default ACL associated with the specified files or directories. This option was added during
the Linux port of XFS, and is not IRIX compatible.
-r Set the access ACL recursively for each subtree rooted at pathname(s). This option was also added during the Linux port of XFS, and
is not compatible with IRIX.
EXAMPLES
A minimum ACL:
chacl u::rwx,g::r-x,o::r-- file
The file ACL is set so that the file's owner has "rwx", the file's group has read and execute, and others have read only access to the
file.
An ACL that is not a minimum ACL, that is, one that specifies a user or group other than the file's owner or owner's group, must contain a
mask entry:
chacl u::rwx,g::r-x,o::r--,u:bob:r--,m::r-x file1 file2
To set the default and access ACLs on newdir to be the same as on olddir, you could type:
chacl -b `chacl -l olddir |
sed -e 's/.*[//' -e 's#/# #' -e 's/]$//'` newdir
CAUTIONS
chacl can replace the existing ACL. To add or delete entries, you must first do chacl -l to get the existing ACL, and use the output to
form the arguments to chacl.
Changing the permission bits of a file will change the file access ACL settings (see chmod(1)). However, file creation mode masks (see
umask(1)) will not affect the access ACL settings of files created using directory default ACLs.
ACLs are filesystem extended attributes and hence are not typically archived or restored using the conventional archiving utilities. See
attr(5) for more information about extended attributes and see xfsdump(8) for a method of backing them up under XFS.
SEE ALSO
getfacl(1), setfacl(1), chmod(1), umask(1), acl_from_text(3), acl(5), xfsdump(8)
September 2001 ACL File Utilities CHACL(1)