Re: getting absolute directory path?
- From: lawpoop@xxxxxxxxx
- Date: Wed, 30 Apr 2008 13:43:35 -0700 (PDT)
On Apr 30, 9:34 am, "Peter H. Coffin" <hell...@xxxxxxxxxxxxx> wrote:
If too many files for the command buffer is what's preventing me from
using a wildcard , then I could do the same results by doing something
like '$> command a*; command b*;' etc.
Sometimes. It depends on what you're trying to do. If you're trying to
do an operation to each file, you're okay. If you're trying to (for
example) get a count of the total number of lines that refer to a
particular included module in all the .c files in a massive directory
but not in the .php files, that may be a bit more of a challenge.
grep -c "search_string" *.c
What is more of a challenge to me, however, is doing a function
recursively into certain subdirectories while ignoring others.
Or, do I create directories and organize them thematically, according
to the functions of the website, such as 'new_customer_signup'? What
happens when that directory gets too many files in it?
It seems to me, that if the website is has grown so much that there
are too many files in the root directory, so much so that you can't
properly run commands on it, that a website is not the right solution
for the problem. There's a flaw in the design somewhere, and the
number of files in the root directory is a symptom of it.
Often it's a problem. Sometimes it's a matter of growth outstripping the
time available to rework a functioning site.
It makes sense in the case of images, when you might have thousands or
tens of thousands. But for php files?
Can a website really grow so much that you outstrip the amount of
files that a directory can hold? Presumably all of these php files are
written by hand; if not, there's some incredible redundancy -- you
just don't need that many php files. ( I can see that, however, for
something like images or thumbnails, etc. ) . If you really do need
that amount of code, I would bet that a website/PHP application is the
wrong solution for the task.
I mean, if the problem is more than 10,000 files in a directory, who's
going to write all those files?
I'm willing to see the other side of this, but so far I can't think of
an instance where a file management task I'm doing on the command line
is going to be more cumbersome within a single directory than across
and into multiple subdirectories. Is wildcarding the only problem?
*grin* It's probably not, but it's the one I've run into more than once,
and it's the one that was primative enough to be a recurring problem
rather than a "solve it once by applying more technology" situtation.
What was the wildcarding problem you had?The size of the command
buffer to expand all of the filenames in * ? Is it something that
cannot be solved by in turn doing command a*, command b* ?
I think I have a good solution; others are cautioning me against it,
but so far, the problems they say I might encounter don't seem all
that problematic.
.
- References:
- getting absolute directory path?
- From: lawpoop
- Re: getting absolute directory path?
- From: C. (http://symcbean.blogspot.com/)
- Re: getting absolute directory path?
- From: lawpoop
- Re: getting absolute directory path?
- From: Peter H. Coffin
- Re: getting absolute directory path?
- From: lawpoop
- Re: getting absolute directory path?
- From: Peter H. Coffin
- Re: getting absolute directory path?
- From: lawpoop
- Re: getting absolute directory path?
- From: Peter H. Coffin
- getting absolute directory path?
- Prev by Date: Re: Using Apache's mod_rewrite to hide scripts extension
- Previous by thread: Re: getting absolute directory path?
- Next by thread: [OT] Re: getting absolute directory path?
- Index(es):
Relevant Pages
|