Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

List files order by date

304 views
Skip to first unread message

Jim Kelly

unread,
Sep 6, 2001, 6:51:20 PM9/6/01
to
I am new to the Tandem, sorry about basic question

In Tacl, when listing the files in a subvol, how can I list the files in
descending date order
How do I list all files that have been modified after a given date
How do I list all files in alphabetical order


Brajesh Singh

unread,
Sep 8, 2001, 3:43:02 AM9/8/01
to
"Jim Kelly" <jimkel...@hotmail.com> wrote in message
news:9nbiud$fs5$1...@plutonium.btinternet.com...

Well it's easy to list them alphabetically.....
Just use the FILEINFO command

To list files modified after a given date you could use:
fup info * where modtime > ddmmmyyyy
This command would return files that have their modified date greater than
the value specified by ddmmmyyyy
You could also use "=" and "<" operators.

I'm not sure about displaying files in descending date order though....there
might be a way....but I just don't know about it.


Art Rice

unread,
Sep 8, 2001, 12:53:33 PM9/8/01
to
Brajesh Singh wrote:

I would probably be best to do a FILEINFO to a variable or outfile and sort
that output on the timestamp column. There is an old ITUG utility called
DIR which I believe can do this. I haven't tried it in about 5 years but
the code is still at ITUG and could be easily modified for that type of
output.

--
Art Rice
Tandem Admin
Special Data Processing Corp
----------------------------
All opinions are my own and do not reflect
the views of the above mentioned employer.

Kari Kujansuu

unread,
Sep 9, 2001, 1:41:08 PM9/9/01
to
On Thu, 6 Sep 2001 23:51:20 +0100, "Jim Kelly" <jimkel...@hotmail.com> wrote:
>
> In Tacl, when listing the files in a subvol, how can I list the files in
> descending date order
>
Unfortunately TACL (nor FUP) doesn't support sorting the files in date order.
You could write a macro to do that but it would be cumbersome and slow.
Try my (unsupported) SELECT utility at http://194.251.228.100:5555/kku/tools.html. The command

SELECT FILE subvol.* FILENAME, MODTIME SORT DESC MODTIME

will display the names of the files and their modification times in descending order. You can also add other attributes to display or a WHERE clause, eg.

SELECT FILE subvol.* FILENAME, MODTIME SORT DESC MODTIME WHERE MODTIME > 2001-09-04

SELECT can also display information about processes and other things.

hope this helps,
Kari Kujansuu
Compaq Computer, Finland


Nelly

unread,
Sep 10, 2001, 7:36:13 PM9/10/01
to
Try creating a macro like this which lists them in date order (ascending)

?SECTION DIR^SORT ROUTINE
#FRAME
[#DEF dir^sort1 ROUTINE |BODY|
#PUSH ^filename ^filecount ^totfilesize
#SET ^filecount 0
#SET ^totfilesize 0
[#CASE [#ARGUMENT/VALUE ^filename/FILENAME /SYNTAX/ END]
|1|
#OUTPUT /COLUMN 4/ Volume is [#FILEINFO/VOLUME/ [^filename]]
#OUTPUT /COLUMN 4/ Directory of [#FILEINFO/SUBVOL/ [^filename]]
#OUTPUT
|2|
#OUTPUT
#OUTPUT File not found
#OUTPUT
#RETURN
]
#SETSCAN 0
[#LOOP
|DO|
[#CASE [#ARGUMENT/VALUE ^filename/FILENAME END]
|1|
#APPEND unsorted^flist [#FILEINFO /MODIFICATION, FULLNAME/ [^filename]]
|2|
#RETURN
]
|UNTIL| 0
]
]
[#DEF dir^sort2 ROUTINE |BODY|
#PUSH ^fname ^rubbish
#SETSCAN 0
[#LOOP
|DO|
#SETMANY ^rubbish ^fname , [#LINEGET sorted^flist 1 FOR 1]
DIR^DETAIL [^fname]
#SET ^filecount [#COMPUTE ^filecount + 1]
#SET ^totfilesize [#COMPUTE ^totfilesize + [#FILEINFO /EOF/ [^fname]]]
#LINEDEL sorted^flist 1 FOR 1
|UNTIL| [#EMPTYV sorted^flist]
]
#OUTPUT /WIDTH 16, JUSTIFY RIGHT, HOLD/ [^filecount] file(s)
#OUTPUT /WIDTH 17, JUSTIFY RIGHT/ [^totfilesize] bytes
]
SINK [#PURGE ZSORTIN]
SINK [#PURGE ZSORTOUT]
PUSH unsorted^flist sort^command sorted^flist throw^away
dir^sort1 [#FILENAMES [#REST]]
VARTOFILE unsorted^flist ZSORTIN
#APPEND sort^command ASC 1:16 INTEGER
#APPEND sort^command FROM ZSORTIN
#APPEND sort^command TO ZSORTOUT
#APPEND sort^command RUN
SORT /INV sort^command, OUTV throw^away/
FILETOVAR ZSORTOUT sorted^flist
dir^sort2
#UNFRAME

JerryS

unread,
Sep 10, 2001, 10:40:15 PM9/10/01
to
Also, I believe there is an example of a bubble sort in the Tacl
manual which may help.

Thanks in advance,
JerryS
===========================

On Thu, 6 Sep 2001 23:51:20 +0100, "Jim Kelly"
<jimkel...@hotmail.com> wrote:

0 new messages