Name
file
- file
option name
[arg
...] This command provides operations for reading and writing attributes of files.
Option
is one of the options described below.Name
is a filename, which can use tilde (˜) expansion.- file atime
name
Return time that file was last accessed, in POSIX format (seconds since the start of the epoch).
- file attributes
name
file attributesname
[option
]file attributesname
[option value
...] Set or get platform-dependent file attributes. The first form returns attributes as a list of name-value pairs. The second form returns the value of the named attribute. The third form sets one or more named attributes.
- file copy [-force] [- -]
source target
file copy [-force] [- -]source... targetDir
Make a copy of a file or copy files to a directory.
Options
- -force
Overwrite existing files.
- - -
Marks end of options.
- file delete [-force] [- -]
pathname
... Delete one or more files indicated by
pathname
.
Options
- -force
Overwrite existing files.
- - -
Marks end of options.
- file dirname
name
Return directory portion of path
name
.- file executable
name
Return 1 if file
name
is executable by current user, 0 otherwise.- file exists
name
Return 1 if file
name
exists and current user has search permissions for directories leading to it, 0 otherwise.- file extension
name
Return characters after and including last period. If there is no period in
name
, return empty string.- file isdirectory
name
Return 1 if file
name
is a directory, 0 otherwise.- file isfile
name
Return 1 if file
name
is a regular file, 0 otherwise.- file ...
Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.