LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-01-2003, 01:21 PM   #1
pat57
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Rep: Reputation: 0
Question BASH vs CSH: * cant see very large files


I'm running the LINUX 2.4 kernel.
I have created some VLF (files >2Gig).
When I'm in the bash shell and type:
ls -l *
They show up in the list.
When I'm in the c shell they do not. In fact,
any c shell scripts that rely on "*" kind of
file existence checking fail.

I really need to use the c shell scripts on
directories containing VLF.

my limit/ulimit is unlimited.

From browsing on the web, I was wondering if
my c shell was compiled with some options
not set correctly for VLF.

How can I check this? Fix this? Any ideas?
 
Old 08-01-2003, 09:10 PM   #2
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
When you do

ls *

does it work for any kind of file regardless of size or does it always say

ls: *: No such file or directory

If it always fails then it has because file globbing has been turned off
with the shell variable noglob.

To check what is set --

set | egrep glob

To unset --

unset noglob

If it is not case, what is the actual error message when you do

ls *

in a directory with very big file?
 
Old 08-01-2003, 09:12 PM   #3
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Oh and make life easier for yourself puhleaze.

Do not use csh, use tcsh!
 
Old 08-04-2003, 09:53 AM   #4
pat57
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
1) glob: "set | egrep glob" returned nothing.
I tried "unset noglob" and still had the same problem.

2) In Bash shell: "ls" and "ls *" give the same result,
both show all files, large and small.
In C shell "ls" shows all files, large and small.
"ls *" only shows files < 2Gig.
When I move the big file into a directory
by itself, and do "ls *" I get the error:
"ls: no match."

3) tcsh: I get the same behavior from "ls" and "ls *":
the very large files do not show up in the list
when the wildcard is used.

Thankyou very much for your suggestions. Any more? I'm
stuck.
Could it be that the c shell wasn't compiled correctly for large files?

- Pat
 
Old 08-04-2003, 10:54 AM   #5
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
So the obvious cause of the problem was not the problem at all.

To pursue this further I need to know some things -

1) which distribution are you using?

2) what version of csh and/or tcsh are you using?

3) what is the output of the command

$> which ls

3) if you explicitly use the command in csh/tcsh

$> /bin/ls *

do you see anything for VLFs?

4) Are these files on an NFS mounted directory?

5) Did you search the web with your favorite search engine using
the keywords "csh very large files" and then find and read the article at

<http://archive.lug.boulder.co.us/bym.../msg00222.html>
 
Old 08-04-2003, 12:59 PM   #6
pat57
LQ Newbie
 
Registered: Aug 2003
Posts: 3

Original Poster
Rep: Reputation: 0
1) My distribution: Redhat 2.4.19, kernel 2.4.8
2) csh/tsh version: apparently my csh is linked to tcsh,
so I'm actually using tcsh and didn't know it. It's version:
6.10.00
3) which ls:
tcsh: ls aliased to ls --color=tty
bash: /bin/ls
4) using /bin/ls while in tcsh (in a directory that contains only 1 VLF):
/bin/ls - no match
5) NFS: I originally noticed this problem on an NFS
mounted directory, and suspected an NFS problem. To test, I created a c program that wrote a VLF locally. This local file cannot be seen either, and is the one that I'm using now for testing (I may have NFS issues as well, but
that will be the next problem once this one is solved).
6) The article: that compiler option looks like the one I
had to use to generate my test file. The vendor I bought
our system from said he only uses bash. Maybe they
didn't test the tcsh with large files.
So .... do you think it's the shell? Do you think I need to
recompile it? Again, thankyou very much!
 
Old 08-04-2003, 02:32 PM   #7
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Quote:
Originally posted by pat57
1) My distribution: Redhat 2.4.19, kernel 2.4.8
That does not make sense. Your kernel version is either 2.4.8 or 2.4.19.
Type

$> uname -a

to see which kernel you are actually running.

As to Redhat version,

$> cat /etc/redhat-release

Quote:
Maybe they didn't test the tcsh with large files.
That would be typical of vendors -- only test the bare minimum.

Quote:
So .... do you think it's the shell? Do you think I need to
recompile it? Again, thankyou very much!
It looks that way. What I do not understand is why it is related to the shell
since it is the /bin/ls binary which you are using to do the listing regardless of the shell.

Now if you were using the inbuilt tcsh listing

ls-F I would understand why there was a problem.

The obvious thing to do is to get the latest version of tcsh from

<http://www.tcsh.ORG> (bookmarking for future reference!)

and clicking on Most Recent Release links.

Or just

<http://rpm.pbone.NET>

to find an rpm for your distribution.

Quote:
It's version: 6.10.00
I have RedHat9 and have tcsh-6.12-4. In the file /usr/share/doc/tcsh-6.12/Fixes which lists the Fixes for each version

40 V6.11.00 - 20010902
blah blah
22. LARGEFILE support on Linux.
blah blah

57. V6.10.00 - 20001119

Which begs the question, why are you using such an ancient (over 2.5 years old) version of tcsh?

As a dedicated die-hard tcsh user, if you want an example of a .tcshrc, .aliases, .login, .logout doing useful tricks, let me know.

The most powerful feature of tcshrc is command completion with TAB.

But do you know about using <ESC>p to do pattern matching in the history, and also about setting up your own completions?

Hope this helps .........
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Script for csh or bash unihiekka Programming 5 10-15-2005 09:51 AM
how to add script files to /etc/csh.login Enigmatic_Desires Linux - Newbie 2 06-22-2005 06:45 AM
shell confusion..what is diff between bash, ksh, csh, tcsh..?? servnov Linux - Newbie 7 11-18-2004 08:28 PM
Compress large files deweirdt Linux - Software 1 02-11-2004 07:18 AM
How to backup large files( > 2G or 4G)? myunicom Linux - General 4 09-24-2003 08:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration