Problems with ls -lrt


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Problems with ls -lrt
# 1  
Old 07-15-2010
Problems with ls -lrt

I am doing

Code:
ls -lrt

and it does not respond and have to close the xterm

Code:
ls

works ok
# 2  
Old 07-15-2010
Are you using ldap by chance or some other directory service? The difference between the two commands is that the first command performs all kinds of username and groupname lookups. If your directory service functions poorly there may be delays. It could also be an NFS problem..
# 3  
Old 07-15-2010
Quote:
Originally Posted by kristinu
I am doing

Code:
ls -lrt

and it does not respond and have to close the xterm

Code:
ls

works ok
Have you tried without -lr ? As Scrutinizer stated when doing an ls -l, if you have windbind / ldap or any type of external authorization source you can gravely slowdown the look up with ls -l (since it does a lookup to resolve the names)
# 4  
Old 07-15-2010
Code:
ls -t

works fine

I'm using Fedora 10. Any idea how I can get this to work as it's frustrating having to close the xterm

Last edited by kristinu; 07-15-2010 at 08:58 PM..
# 5  
Old 07-16-2010
Any ls command with -l in it will have trouble. -t will not be problematic since it gets its information from the inodes, not from the network. There is probably something wrong with your system or network service and you will have to troubeshoot. Most likely getent passwd will not work either. Have a look at /etc/nsswitch.conf to see what directory service is being used for passwd and groups lookup and find out if that is working properly...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

If/then problems

#! /bin/bash # ask what the user would like to do CMD=$CMD MBA=$MB RS=$RS CT=$CT echo echo -n "What would you like to do?? REMEMBER WHEN PROGRAMMING ICP's TO SELECT CORRECT COMMAND ACCORDING TO NECCESSARY TYPE CODE! Please enter a command ct = program ctek ... (5 Replies)
Discussion started by: tdalyman
5 Replies

3. UNIX for Dummies Questions & Answers

Problems with IF Else ??!!

I have written the following code in cygwin to create directories in windows based on the parameter passed. echo $1 > fullpath path1=`awk -F / '{print $1}' $fullpath path2=`awk -F / '{print $2}' $fullpath if then if then if then continue ... (4 Replies)
Discussion started by: janardhanamk
4 Replies

4. 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

5. UNIX for Dummies Questions & Answers

Problems with using less

Hello, I am having problems with using less on Linux version 2.6.18-92.1.17.el5 (brewbuilder@hs20-bc1-7.build.redhat.com) (gcc version 4.1.2 20071124 (Red Hat 4.1.2-42)). I am using csh but have the same problems on bash. If I pipe something to less it works perfectly i.e. cat file | less... (9 Replies)
Discussion started by: z1dane
9 Replies

6. UNIX for Dummies Questions & Answers

using ls -lrt instead of ls

I have a requirement in which I shud use ls -lrt instead of ls command because when we use ls command we get an error..the script part where i get error is given below for SAPRESPONSEFILES in `ls $SAPRESPONSEGOFILE | sed "s/go/dat/g"` basically the script processes the files of format... (11 Replies)
Discussion started by: praviper
11 Replies

7. 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

8. 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

9. 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

10. UNIX for Advanced & Expert Users

'make' problems (compliation problems?)

I'm trying to compile and install both most recent version of 'make' and the most recent version of 'openssh' on my Sparc20. I've run into the following problems... and I don't know what they mean. Can someone please help me resolve these issues? I'm using the 'make' version that was... (5 Replies)
Discussion started by: xyyz
5 Replies
Login or Register to Ask a Question