Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!samsung!sdd.hp.com!apollo!vinoski From: vinoski@apollo.HP.COM (Stephen Vinoski) Newsgroups: comp.sys.apollo Subject: Re: Peculiar behaviour of "ls //" Message-ID: <4f7aa1e7.20b6d@apollo.HP.COM> Date: 28 Jan 91 17:55:00 GMT References: Sender: root@apollo.HP.COM Reply-To: vinoski@apollo.HP.COM (Stephen Vinoski) Distribution: comp Organization: Hewlett-Packard Company, Apollo Division; Chelmsford, MA Lines: 33 In article jnp@tnds05.tele.nokia.fi (J|rgen N|rgaard) writes: >What happens is that a command like, say, "ls //" takes rather long time to >complete whereas "time ls //" is very fast. > >First "ls //": > bash# date; ls // ; date > Mon Jan 28 14:34:55 EET 1991 > .bash_history* .emacs* andromeda/ dionysos/ kronos/ > .bash_login* afrodite/ atlas/ kirke/ mjolner/ > Mon Jan 28 14:39:18 EET 1991 > bash# > > >That is 5 minutes to complete "ls" (amazing indeed !) > >Next "time ls //": > bash# time ls // > .bash_history .emacs andromeda dionysos kronos > .bash_login afrodite atlas kirke mjolner > 0.5 real 0.0 user 0.1 sys > bash# It looks like your "ls" is an alias for "ls -F" which results in a stat() for every entry to be listed. When you run it via the "time" command, the alias is not used. -steve | Steve Vinoski (508)256-6600 x5904 | Internet: vinoski@apollo.hp.com | | Testability and Diagnostics | UUCP: ...mit-eddie!apollo!vinoski| | HP Apollo Division, Chelmsford, MA 01824 | ...uw-beaver!apollo!vinoski|