Sponsored Content
Full Discussion: Posix Attributes
Top Forums UNIX for Beginners Questions & Answers Posix Attributes Post 303044881 by Neo on Saturday 7th of March 2020 04:29:16 AM
Old 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

rcp and file attributes

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

file attributes

how do we set file attributes at shell prompt (2 Replies)
Discussion started by: hytechpro
2 Replies

3. UNIX for Dummies Questions & Answers

how to find system attributes

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

file attributes

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

file attributes and exception

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

Problems with any ls attributes

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

Help with can't get execution attributes

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

Identify User Attributes

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

How to remove attributes of a file?

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

File attributes ????

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
DLM_CONTROLD(8) 							dlm							   DLM_CONTROLD(8)

NAME
dlm_controld - dlm cluster control daemon SYNOPSIS
dlm_controld [OPTIONS] DESCRIPTION
The kernel dlm requires a user daemon to manage lockspace membership. dlm_controld manages lockspace membership using corosync cpg groups, and translates membership changes into dlm kernel recovery events. dlm_controld also manages posix locks for cluster file systems using the dlm. OPTIONS
Command line options override a corresponding setting in dlm.conf(5). For default settings, see dlm_controld -h. --daemon_debug | -D enable debugging to stderr and don't fork --foreground don't fork --log_debug | -K enable kernel dlm debugging messages --protocol | -r str dlm kernel lowcomms protocol: tcp, sctp, detect --debug_logfile | -L write debugging to log file --enable_plock | -p 0|1 enable/disable posix lock support for cluster fs --plock_debug | -P enable plock debugging --plock_rate_limit | -l int limit rate of plock operations (0 for none) --plock_ownership | -o 0|1 enable/disable plock ownership --drop_resources_time | -t int plock ownership drop resources time (milliseconds) --drop_resources_count | -c int plock ownership drop resources count --drop_resources_age | -a int plock ownership drop resources age (milliseconds) --post_join_delay | -j int seconds to delay fencing after cluster join --enable_fencing | -f 0|1 enable/disable fencing --enable_concurrent_fencing 0|1 enable/disable concurrent fencing --enable_startup_fencing | -s 0|1 enable/disable startup fencing --enable_quorum_fencing | -q 0|1 enable/disable quorum requirement for fencing --enable_quorum_lockspace 0|1 enable/disable quorum requirement for lockspace operations --fence_all str fence all nodes with this agent --unfence_all enable unfencing self with fence_all agent --help | -h print this help, then exit --version | -V Print program version information, then exit SEE ALSO
dlm_tool(8), dlm.conf(5) dlm 2012-04-05 DLM_CONTROLD(8)
All times are GMT -4. The time now is 03:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy