Unable to see all file in a current directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Unable to see all file in a current directory
# 1  
Old 09-27-2006
Unable to see all file in a current directory

Hi,

I am unable to see all files in a current directory when use "ls -lrt" command
it is giving error message as below ( I think this current directory is having about 500 files)

<CONTROL /home/ckanth/sri>ls -lrt
UX:ls: ERROR: Out of memory: Insufficient or invalid memory

But when i give specific argument it is working
<CONTROL /home/ckanth/sri>ls -lrt *PRINT

-rw-rw-rw- 1 logic sri 51153 Sep 25 08:55 560PRINT
-rw-rw-rw- 1 logic sri 47045 Sep 26 10:07 561PRINT
-rw-rw-rw- 1 logic sri 48704 Sep 27 11:03 562PRINT

I will be very gladful if you give a solution of same.

thanks
# 2  
Old 09-27-2006
seems like there are too many files in that directory and the Operating System ran out of memory when sorting the list of files.
Try ls -f instead.
Or you may have to solve the memory problem at kernel level.
# 3  
Old 09-27-2006
Hi yogesh,

command "ls -f" is not working and giving same error message.
any remedy of same.
# 4  
Old 09-27-2006
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Delete .txt file from current directory

I have created few text file during run time by redirecting the txt file echo USER_LIST_"$(date '+%d%h%Y')".csv > report_location.txt report_location.txt is creating in the same location where I run script home/script When I try to remove the txt file at the end of the... (3 Replies)
Discussion started by: stew
3 Replies

2. UNIX for Dummies Questions & Answers

Viewing file size in current directory

What is the command line for viewing the sizes(lines and bytes)of all the files in your present working directory? Is it >ls -la (2 Replies)
Discussion started by: Payton2704
2 Replies

3. Shell Programming and Scripting

I need to back up a bunch of files on a directory and save that file as the current date....

this is what i have to find the files modified within the past 24 hours find . -mtime -1 -type f -print0 | xargs -0 tar rvf "$archive.tar" however i need to save/name this archive as the current date (MM-DD,YYYY.tar.gz) how do i doo this (1 Reply)
Discussion started by: bugenhagen_
1 Replies

4. UNIX for Dummies Questions & Answers

find the file names having specified pattern at specified position in the current directory

I would need a command for finding first 15000 of the file names whose 25th postion is 5 in the current directory alone. I do have this painful command find . -name '5*' | head -15000 | cut -c3- please refine this. Of course the above command also searches in the sub directories... (3 Replies)
Discussion started by: vk39221
3 Replies

5. Programming

help with printing file names in current directory for C

How do I print all the file names in current directory in C? (6 Replies)
Discussion started by: omega666
6 Replies

6. Shell Programming and Scripting

An Issue with the script which used to remove a file from the current directory.

Hello forum members, I am writing a script to two tasks. 1: displaying the list of the files in the current directory. 2: removing the specifed file from the list. I have written a sample script ,so can u please verfiy and correct. echo Enter list of files ls *.txt read textfile rm -f... (3 Replies)
Discussion started by: sivaranga001
3 Replies

7. Shell Programming and Scripting

Finding files in current directory when 100,000's files in current directory

Hi All I was wondering what is the most efficient way to find files in the current directory(that may contain 100,000's files), that meets a certain specified file type and of a certain age. I have experimented with the find command in unix but it also searches all sub directories. I have... (2 Replies)
Discussion started by: kewong007
2 Replies

8. UNIX for Dummies Questions & Answers

How to find the list of 5 largest file in current directory?

Hello, How to find the list of 5 largest(size wise) file in current directory?i tried using ls -l | sort -t " " -r +5 -6 -n | head -5 but this is not giving correct output as ls -l command gives 1 extra line of output that is how many total files are there!so by running the above... (4 Replies)
Discussion started by: salman4u
4 Replies

9. Solaris

check the current date file in directory

Hi, I am making a script which check the directory and if there is today date file, it is showing message file is there for today date . 1) filename is accessline.win.$timestamp example ;-accessline.win.200712211004 2) On monday i have recieved two file in this directory with current... (2 Replies)
Discussion started by: pallvi
2 Replies

10. Programming

Finding largest file in current directory?

I was hoping to get some assistance with this C program I am working on. The goal is to find the largest file in the current directory and then display this filename along with the filesize. What I have so far will display all the files in the current directory. But, how do I deal with "grabbing"... (1 Reply)
Discussion started by: AusTex
1 Replies
Login or Register to Ask a Question