runat1
Run a shell command on a named attribute directory
Usage
runat [file]
[shell
command]
Overview
The runat utility runs the shell command on the named attribute directory for the file argument. It does a fchdir(2) system call to change the current working directory into the named attribute directory for the file argument and then performs the shell command via sh(1).
If a named attribute directory does not exist for file, an empty one will be created. If an application needs to determine if a named attribute exists for the file, pathconf(2) with the name _PC_HAS_NAMEDATTR may be used. This will not create an empty named attribute directory if one does not exist for file.
Examples
For a file called “myfile”:
$ runat myfile ls -l # lists the attributes for myfile $ runat myfile cp /etc/hosts attrhosts # creates attrhosts $ runat myfile cat attrhosts # displays contents of attrhosts
Releases
3 releases since FreeBSD 15.0-RELEASE; the text changed 1 time.