03-07-2020
Maybe here?
PosixFileAttributes (Java Platform SE 7 )
Quote:
public interface PosixFileAttributes
extends BasicFileAttributes
File attributes associated with files on file systems used by operating systems that implement the Portable Operating System Interface (POSIX) family of standards.
The POSIX attributes of a file are retrieved using a PosixFileAttributeView by invoking its readAttributes method.
Method Summary
Methods
Modifier and Type Method and Description
GroupPrincipal group()
Returns the group owner of the file.
UserPrincipal owner()
Returns the owner of the file.
Set<PosixFilePermission> permissions()
Returns the permissions of the file.
Methods inherited from interface java.nio.file.attribute.BasicFileAttributes
creationTime, fileKey, isDirectory, isOther, isRegularFile, isSymbolicLink, lastAccessTime, lastModifiedTime, size
Method Detail
owner
UserPrincipal owner()
Returns the owner of the file.
Returns:
the file owner
See Also:
FileOwnerAttributeView.setOwner(java.nio.file.attribute.UserPrincipal)
group
GroupPrincipal group()
Returns the group owner of the file.
Returns:
the file group owner
See Also:
PosixFileAttributeView.setGroup(java.nio.file.attribute.GroupPrincipal)
permissions
Set<PosixFilePermission> permissions()
Returns the permissions of the file. The file permissions are returned as a set of PosixFilePermission elements. The returned set is a copy of the file permissions and is modifiable. This allows the result to be modified and passed to the setPermissions method to update the file's permissions.
Returns:
the file permissions
See Also:
PosixFileAttributeView.setPermissions(java.util.Set<java.nio.file.attribute.PosixFilePermission>)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Good day
Does anyone have an idea on how I can rcp a file together with its attributes. owner,group, permissions ?
Regards
J (2 Replies)
Discussion started by: jhansrod
2 Replies
2. Shell Programming and Scripting
how do we set file attributes at shell prompt (2 Replies)
Discussion started by: hytechpro
2 Replies
3. UNIX for Dummies Questions & Answers
hi,
i am very- very new to unix
i have os - sun solaris 5.9 and i want to learn more about system attributes for example, the make - model of machine , operating system & patch versions
can somebody tell me a usefull command to learn these?
any help would be apreciated,
regards to all,... (3 Replies)
Discussion started by: merope
3 Replies
4. Shell Programming and Scripting
How to retrieve file attributes in a sh/bash script (modification time, access time, size, etc.)? (1 Reply)
Discussion started by: Hitori
1 Replies
5. UNIX Desktop Questions & Answers
hi,
I want to know the date the file was created or modified. I can do this using ls, ll -ltr etc...
I want to do this in a function (so If the file date is older then a week I can report it), is there a way?
another thing...
In sql function, I can catch exceptions, is there a way to do this... (1 Reply)
Discussion started by: krem
1 Replies
6. UNIX for Dummies Questions & Answers
I got a server (test server) that hangs anytime we run a ls attribute like ls -ltr or ls -al. We can run ls | more command with no problem. But getting back to the ls attribute problem, it just sits and hangs, I did a ps -ef | grep ls, and a user had 15 sessions of ls -al running, I killed those,... (3 Replies)
Discussion started by: Sarccastik Dude
3 Replies
7. UNIX for Advanced & Expert Users
Hi Gurus,
I am trying to create a FS using SVM but system is throwing the following error.
newfs /dev/md/rdsk/d1002
newfs: construct a new file system /dev/md/rdsk/d1002: (y/n)? y
/usr/sbin/clri: can't get execution attributes (1 Reply)
Discussion started by: rama krishna
1 Replies
8. AIX
SOS Guys...
Is there any way to determine the user attributes, mainly if that userid is set as never expire?
I do not have admin rights, and I'm working on AIX 5.3
I've tried :
lsuser -f <username>
but no luck on that (2 Replies)
Discussion started by: freakygs
2 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I opened a file by accident (with a java program, which has been uninstalled!) and from then on, all the file with .fasta extension has been changed with an icon (So annoying!!) and the file attributes has been changed with the property:
Type: application/x-wine-extension-fasta type... (6 Replies)
Discussion started by: yifangt
6 Replies
10. UNIX for Beginners Questions & Answers
I'm trying to sort out the charing of a problem folder, in the 'ls -l' list is shows as:
d???????????? ? ? ? ? ? Pi-Share
PiShare is the name of the directory, all the ??s make no sense to me at all, and no user (there are only two, pi and root) can make any changes to it.... (4 Replies)
Discussion started by: MuntyScrunt
4 Replies
LEARN ABOUT REDHAT
localedef
LOCALEDEF(1) General Commands Manual LOCALEDEF(1)
NAME
localedef - compile locale definition files
SYNOPSIS
localedef [-f charmapfile] [-i inputfile] [--force] [--verbose] [--posix] [--quiet] outputpath
localedef --version
localedef --help
DESCRIPTION
The localedef program reads the indicated charmap and input files, compiles them to a form usable by the locale(7) functions in the C
library, and places the six output files in the outputpath directory.
If no charmapfile is given, POSIX is used by default. If no inputfile is given, or if it is given as -, localedef reads from standard
input.
OPTIONS
Most options can have either short or long forms. If multiple short options are used, they can be combined in one word (e.g. -cv). If an
option takes an argument, the argument can be given separately as the next word, or it can be written as option=argument.
-f charmapfile, --charmap=charmapfile
Specify the file that defines the symbolic character names that are used by the input file. If the file is in the default directory
for character maps, it is not necessary to specify the full pathname. This default directory is printed by localedef --help.
-i inputfile, --inputfile=inputfile
Specify the locale definition file to compile. If inputfile is not absolute, localedef will also look in the directory specified by
the environment variable I18NPATH and in the default directory for locale definition files. This default directory is printed by
localedef --help.
-c, --force
Write the output files even if warnings were generated about the input file.
-v, --verbose
Generate extra warnings about errors that are normally ignored.
--quiet
Suppress all notifications and warnings, and report only fatal errors.
--posix
Be strictly POSIX conformant. Implies --verbose. This option currently has no other effect. Posix conformance is assumed if the
environment variable POSIXLY_CORRECT is set.
-u codeset, --code-set-name=codeset
This option is accepted but ignored.
-h, --help
Print a usage summary and exit. Also prints the default paths used by localedef.
-V, --version
Print the version number, license, and disclaimer of warranty for localedef.
ENVIRONMENT
POSIXLY_CORRECT
The --posix flag is assumed if this environment variable is set.
I18NPATH
The default directory for locale definition files.
FILES
/usr/share/i18n/charmaps
Usual default charmap path.
/usr/share/locale
Usual default output path. See the output from localedef --help for the paths used in your version.
outputpath/LC_COLLATE
One of the output files. It describes the rules for comparing strings in the locale's alphabet.
outputpath/LC_CTYPE
One of the output files. It contains information about character cases and case conversions for the locale.
outputpath/LC_MONETARY
One of the output files. It describes the way monetary values should be formatted in the locale.
outputpath/LC_MESSAGES/SYS_LC_MESSAGES
One of the output files. It contains information about the language messages should be printed in, and what an affirmative or nega-
tive answer looks like.
outputpath/LC_NUMERIC
One of the output files. It describes the rules for formatting numbers in the locale.
outputpath/LC_TIME
One of the output files. It describes the rules for formatting times and dates in the locale.
SEE ALSO
locale(5), locale(7), locale(1)
AUTHOR
The program was written by Ulrich Drepper.
This manpage was written by Richard Braakman <dark@xs4all.nl> on behalf of the Debian GNU/Linux Project and anyone else who wants it. The
manpage is not supported by the GNU libc maintainers and may be out of date.
STANDARDS
This program conforms to the POSIX standard P1003.2
Red Hat Linux March 2001 LOCALEDEF(1)