<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://pickwiki.org/index.php?action=history&amp;feed=atom&amp;title=GetFileInfo</id>
	<title>GetFileInfo - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://pickwiki.org/index.php?action=history&amp;feed=atom&amp;title=GetFileInfo"/>
	<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=GetFileInfo&amp;action=history"/>
	<updated>2026-04-28T22:10:45Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://pickwiki.org/index.php?title=GetFileInfo&amp;diff=1827&amp;oldid=prev</id>
		<title>Conversion script: link fix</title>
		<link rel="alternate" type="text/html" href="https://pickwiki.org/index.php?title=GetFileInfo&amp;diff=1827&amp;oldid=prev"/>
		<updated>2015-02-26T23:48:54Z</updated>

		<summary type="html">&lt;p&gt;link fix&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;HomePage&amp;gt;&amp;gt;SourceCode&amp;gt;&amp;gt;[[BasicSource]]&lt;br /&gt;
&lt;br /&gt;
A wrapper around a call to fstat.  This version calls a perl script, [[PerlVersionOfFstat]], since AIX does not appear to have an fstat command.&lt;br /&gt;
&lt;br /&gt;
There is a new command or basic function to do this directly in ud5.  I cannot find any info in the manual, anyone know what it&amp;#039;s called?  Obviously this subroutine would not be needed in that case :-)&lt;br /&gt;
&lt;br /&gt;
Update: the command is the aptly-named &amp;quot;DIR&amp;quot; command.  That should be used instead of this routine.&lt;br /&gt;
&lt;br /&gt;
Syntax&lt;br /&gt;
&lt;br /&gt;
DIR(file.expr)&lt;br /&gt;
&lt;br /&gt;
Description&lt;br /&gt;
&lt;br /&gt;
The [[UniBasic]] DIR function returns the file size (in bytes), the last &lt;br /&gt;
date and time the file was modified (in internal format), and the &lt;br /&gt;
privileges for the file. [[UniData]] stores these values in the first &lt;br /&gt;
four attributes of the return value. file.expr must evaluate to a &lt;br /&gt;
file name at the operating system level. If you do not specify a &lt;br /&gt;
path name, [[UniData]] searches the current directory. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;PRE&amp;gt;&lt;br /&gt;
SUBROUTINE TRIN.GET.FILE.INFO(FILE, INFO)&lt;br /&gt;
***************************************************************************&lt;br /&gt;
* Program: TRIN.GET.FILE.INFO&lt;br /&gt;
* Author : Ian [[McG]]&lt;br /&gt;
* Date   : 02/14/2000&lt;br /&gt;
* Edited : 13:40:04 Feb 14 2000 By MCGOWAN &lt;br /&gt;
* Comment: Return O[[/S]] info about a file/directory&lt;br /&gt;
***************************************************************************&lt;br /&gt;
* Date       By   Desc&lt;br /&gt;
* ---------- ---- ---------------------------------------------------------&lt;br /&gt;
* INFO&amp;lt;1&amp;gt; = Device number of file system&lt;br /&gt;
* INFO&amp;lt;2&amp;gt; = Inode#&lt;br /&gt;
* INFO&amp;lt;3&amp;gt; = File mode&lt;br /&gt;
* INFO&amp;lt;4&amp;gt; = Number of hard links to file&lt;br /&gt;
* INFO&amp;lt;5&amp;gt; = File owner&lt;br /&gt;
* INFO&amp;lt;6&amp;gt; = Group owner&lt;br /&gt;
* INFO&amp;lt;7&amp;gt; = Device identifier&lt;br /&gt;
* INFO&amp;lt;8&amp;gt; = Size, in bytes&lt;br /&gt;
* INFO&amp;lt;9&amp;gt; = Last access time and date&lt;br /&gt;
* INFO&amp;lt;10&amp;gt;= Last modify time and date&lt;br /&gt;
* INFO&amp;lt;11&amp;gt;= Inode change time and date&lt;br /&gt;
* INFO&amp;lt;12&amp;gt;= Blksize&lt;br /&gt;
* INFO&amp;lt;13&amp;gt;= Actual blocks allocated&lt;br /&gt;
&lt;br /&gt;
EXECUTE &amp;quot;!/usr/local/bin/fstat &amp;quot;:FILE CAPTURING INFO&lt;br /&gt;
IF INFO=&amp;#039;&amp;#039; THEN RETURN&lt;br /&gt;
O=INFO&amp;lt;5&amp;gt; ; GOSUB GET.OWNER ; INFO&amp;lt;5&amp;gt;=O&lt;br /&gt;
D=INFO&amp;lt;9&amp;gt; ; GOSUB PROCESS.DATE ; INFO&amp;lt;9&amp;gt;=D&lt;br /&gt;
D=INFO&amp;lt;10&amp;gt;; GOSUB PROCESS.DATE ; INFO&amp;lt;10&amp;gt;=D&lt;br /&gt;
D=INFO&amp;lt;11&amp;gt;; GOSUB PROCESS.DATE ; INFO&amp;lt;11&amp;gt;=D&lt;br /&gt;
RETURN&lt;br /&gt;
&lt;br /&gt;
GET.OWNER:&lt;br /&gt;
   EXECUTE \!grep &amp;quot;:\:O:\:&amp;quot; /etc/passwd | awk &amp;#039;BEGIN {FS=&amp;quot;:&amp;quot;} {print $1}&amp;#039;\ CAPTURING NAME&lt;br /&gt;
   IF NAME#&amp;#039;&amp;#039; THEN O=NAME&amp;lt;1&amp;gt;&lt;br /&gt;
RETURN&lt;br /&gt;
&lt;br /&gt;
PROCESS.DATE:&lt;br /&gt;
   *  Mon Feb 14 13:09:11 2000&lt;br /&gt;
   D=TRIM(D)&lt;br /&gt;
   T=FIELD(D, &amp;#039; &amp;#039;, 4)&lt;br /&gt;
   D=FIELD(D, &amp;#039; &amp;#039;, 2, 2):&amp;#039; &amp;#039;: FIELD(D, &amp;#039; &amp;#039;, 5)&lt;br /&gt;
   &lt;br /&gt;
   D&amp;lt;1,1&amp;gt;=ICONV(D, &amp;#039;D4&amp;#039;)&lt;br /&gt;
   D&amp;lt;1,2&amp;gt;=ICONV(T, &amp;#039;MTS&amp;#039;)&lt;br /&gt;
RETURN&lt;br /&gt;
&amp;lt;/PRE&amp;gt;&lt;/div&gt;</summary>
		<author><name>Conversion script</name></author>
	</entry>
</feed>