Sponsored Content
Full Discussion: using ls -lrt instead of ls
Top Forums UNIX for Dummies Questions & Answers using ls -lrt instead of ls Post 302344098 by Corona688 on Friday 14th of August 2009 03:04:48 PM
Old 08-14-2009
[edit] We cross-edited there.

The ls -l performance issue might be because it prints extended information, if your program can't account for that. We haven't seen your program -- we don't know. We thought maybe it could, but if it can't:
Code:
$ ls crc32.c
crc32.c
$ ls -l crc32.c
-rw-r--r-- 1 tyler users 1634 Jul 15 10:04 crc32.c
$

...which would cause your code to theoretically check for files "-rw-r--r--", "1", "tyler", "users", "1634", "Jul", "15", and "10:04" in addition to "crc32.c" Smilie Its a good idea to check the manual page to see what the flags actually mean instead of blindly adding them.

Try just ls -t or ls --sort=time (they are equivalent) and see if that gets you the sorting order you want. If its backwards, ls -tr reverses it.

Last edited by Corona688; 08-14-2009 at 04:09 PM..
 

6 More Discussions You Might Find Interesting

1. HP-UX

sem_open(), -lrt and creating a library

I am on HP-UX delta B.11.11 I am using sem_open() and compiling/linking the library by specifying -lrt. Then, I am creating library like below: ar cr $libdir/liboscfe.a `cat fe.libs.$$ com.libs.$$` ranlib $libdir/liboscfe.a Now, I am compiling another utility sch2db which requires this... (1 Reply)
Discussion started by: apadha
1 Replies

2. Shell Programming and Scripting

find command nonrecurslu listing ls -lrt

---------------------------------------------------------------------- I have tried find . type -f -exec ls -lrt {} \; but it listed files recursively ,I need only that dir files not internal dir file. --------------------------------------------------------------------- (8 Replies)
Discussion started by: RahulJoshi
8 Replies

3. UNIX for Dummies Questions & Answers

" ls -lrt " not working ! --- Need a insight from a expert .

Hi ! All This might be a silly question.. to experts in unix. but defintely its a interesting question and I want to know the root cause. Here is the problem.... I have a Linux OS box. It has diff files systems. When I go to a DIR like this /RootDIR/NFS/myDIR and give ls -lart .. it... (4 Replies)
Discussion started by: dashok.83
4 Replies

4. Shell Programming and Scripting

Problems with ls -lrt

I am doing ls -lrt and it does not respond and have to close the xterm ls works ok (4 Replies)
Discussion started by: kristinu
4 Replies

5. Shell Programming and Scripting

want to concatenate multiple files based on the rest of ls -lrt

uadm@4132> ls -lrt -rw------- 1 uadm uadm 3811819 Jun 6 04:08 data_log-2010.05.30-10:04:08.txt -rw------- 1 uadm uadm 716246 Jun 13 01:38 data_log-2010.06.06-10:04:08.txt -rw------- 1 uadm uadm 996 Jun 13 04:00 data_log-2010.06.06-10:04:22.txt -rw------- 1 uadm uadm 7471 Jun 20 02:03... (5 Replies)
Discussion started by: mail2sant
5 Replies

6. UNIX for Dummies Questions & Answers

What does total no. of files in ls -lrt o/p means?

when we fire ls -lrt command we see o/p as total 16 drwx------ 9 root root 8192 May 8 2002 lost+found drwxr-xr-x 2 root root 512 Jun 14 2002 TT_DB drwxrwxr-x 2 root root 512 Jul 31 2002 mail here total no. of files is always greater than... (4 Replies)
Discussion started by: Jcpratap
4 Replies
ost::CRC32Digest(3)					     Library Functions Manual					       ost::CRC32Digest(3)

NAME
ost::CRC32Digest - A crc32 collection/computation hash accumulator class. SYNOPSIS
#include <digest.h> Inherits ost::Digest. Public Member Functions CRC32Digest () CRC32Digest (const CRC32Digest &crc) void initDigest (void) unsigned getSize (void) operator const uint32 () const uint32 getDigest (void) unsigned getDigest (unsigned char *buffer) void putDigest (const unsigned char *buffer, unsigned length) CRC32Digest & operator= (const CRC32Digest &right) Protected Member Functions unsigned char overflow (unsigned char octet) std::ostream & strDigest (std::ostream &os) Detailed Description A crc32 collection/computation hash accumulator class. Author: Kevin Kraatz kraatz@arlut.utexas.edu crc32 computation hash. Examples: crc32.cpp. Constructor &; Destructor Documentation ost::CRC32Digest::CRC32Digest () ost::CRC32Digest::CRC32Digest (const CRC32Digest &crc) Member Function Documentation uint32 ost::CRC32Digest::getDigest (void) [inline] Examples: crc32.cpp. unsigned ost::CRC32Digest::getDigest (unsigned char *buffer) [virtual] Implements ost::Digest. unsigned ost::CRC32Digest::getSize (void) [inline], [virtual] Implements ost::Digest. void ost::CRC32Digest::initDigest (void) [virtual] Implements ost::Digest. ost::CRC32Digest::operator const uint32 () const [inline] CRC32Digest& ost::CRC32Digest::operator= (const CRC32Digest &right) unsigned char ost::CRC32Digest::overflow (unsigned charoctet) [protected] void ost::CRC32Digest::putDigest (const unsigned char *buffer, unsignedlength) [virtual] Implements ost::Digest. Examples: crc32.cpp. std::ostream& ost::CRC32Digest::strDigest (std::ostream &os) [protected], [virtual] Implements ost::Digest. Author Generated automatically by Doxygen for GNU CommonC++ from the source code. GNU CommonC++ Sat Jun 23 2012 ost::CRC32Digest(3)
All times are GMT -4. The time now is 08:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy