Sponsored Content
Full Discussion: Folder Contents
Top Forums UNIX for Dummies Questions & Answers Folder Contents Post 38292 by cbkihong on Thursday 10th of July 2003 09:35:33 PM
Old 07-10-2003
I don't know what you mean by TAB separated files. However, if you are satisfied with automatic directory listing that you see on typical Apache servers, then you have to check several things:

1) The directory config allows file listing. In httpd.conf make sure the concerned directory has "Indexes" in "Options". You may need to explicitly add a section to the config file to override the default, which is a very restrictive one.

e.g. try

<Directory "/reports/test">
AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>

2) The directory has a chmod of 755 (don't know if MacOS needs this?)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

copy folder contents

I need to make a new dir in side the dir lab5 the new dir is called testLab5 without changing directories copy all files from your lab5 directory into your testLab5 directory then i have to without chaning directories and using exactly one command remove all files that start with the... (1 Reply)
Discussion started by: robsk8_99
1 Replies

2. UNIX for Dummies Questions & Answers

How to display contents of folder when 'cd' is used

Hi, I am a new learner of Unix. I am currently working on a Solaris 8 machine. Earlier, when I use 'cd <folder name>' command, I am not only able to change the folder but also able to see the contents of the folder as if a 'ls -lt' command was executed. However, since a week, suddenly this... (3 Replies)
Discussion started by: mumashankar
3 Replies

3. Shell Programming and Scripting

Compare folder contents over network

I use diff -r dir1 dir2 to get comparison of two folders that are on same machine. Now I need the same thing but one of the folders is on a different machine. Currently I ftp the folder to a temp folder compare using above command and delete the temp folder. Is there any other better options?... (5 Replies)
Discussion started by: ke3kelly
5 Replies

4. Shell Programming and Scripting

Script to create a folder with contents

I am working on HP Unix. Require a script for the below requirement. Requirement are: 1. Need to create a folder with files. 2. The folder should have a naming convention like - LRIC_ARCHIVE_ddmmyyhhmmss_version_nnn, the version number needs to be selected from an oracle table. 3. When the... (4 Replies)
Discussion started by: Roadies99
4 Replies

5. Shell Programming and Scripting

copy folder and its contents to another folder

Hi experts, I am coming to you with this basic question on copying a folder and its content from one location to another folder using PERL script. This is my requirement. I have a folder AB under /users/myhome I want to copy AB and its contents to /user/workspace. Finally it should... (1 Reply)
Discussion started by: amvarma77
1 Replies

6. Shell Programming and Scripting

Folder contents getting appended as strings while redirecting file contents to a variable

Hi one of the output of the command is as below # sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/' Resource List : <br> *************************** 1. row ***************************<br> ... (2 Replies)
Discussion started by: vivek d r
2 Replies

7. UNIX for Dummies Questions & Answers

Unable to list folder contents

I'm unable to list the contents of a directory once I move into it. I have full permissions on this directory (called "Scripts" in the below example). The scenario is shown below in detail: Command 'ls' works fine to begin with: 1: pmn@linuxhost /home/pmn > cd /opt/smt/proiv 2:... (4 Replies)
Discussion started by: pmn
4 Replies

8. UNIX for Dummies Questions & Answers

Script that sums the contents of a folder (help me)

I'm looking for a script that sums the contents of a folder, When you give a parameter to the script , i want to know the size of the directory, the number of files, number of folders, These are commands that I have already found du -s find . -type f | wc -l find . -type d | wc -ly ... (19 Replies)
Discussion started by: Roggy
19 Replies

9. Shell Programming and Scripting

Remove folder contents

for dir in BKP/*/ do echo You are in :$dir done O/P -- BKP/201448/ BKP/201449/ BKP/201450/ BKP/201451/ BKP/201452/ BKP/201501/ BKP/201502/ BKP/201503/ BKP/201504/ BKP/201505/ BKP/201506/ BKP/201507/ (3 Replies)
Discussion started by: rocking77
3 Replies

10. UNIX for Beginners Questions & Answers

Best way to move the contents of a folder to another one

what is the best way to move the contents of a folder to another one without deleting the structure of the first one. the contents could include subfolder too. both folder, the source-folder and the target-folder are on the same host. any idea is appreciated . (7 Replies)
Discussion started by: andy2000
7 Replies
install::TempContent::Objects::mod_perl-2.0.9::docs::apiUseraContribinstall::TempContent::Objects::mod_perl-2.0.9::docs::api::Apache2::CmdParms(3)

NAME
Apache2::CmdParms - Perl API for Apache command parameters object Synopsis use Apache2::CmdParms (); use Apache2::Module (); use Apache2::Const -compile => qw(NOT_IN_LOCATION); my @directives = ( { name => 'MyDirective', cmd_data => 'some extra data', }, ); Apache2::Module::add(__PACKAGE__, @directives); sub MyDirective { my ($self, $parms, $args) = @_; # push config $parms->add_config(['ServerTokens off']); # this command's command object $cmd = $parms->cmd; # check the current command's context $error = $parms->check_cmd_context(Apache2::Const::NOT_IN_LOCATION); # this command's context $context = $parms->context; # this command's directive object $directive = $parms->directive; # the extra information passed thru cmd_data to # Apache2::Module::add() $info = $parms->info; # which methods are <Limit>ed ? $is_limited = $parms->method_is_limited('GET'); # which allow-override bits are set $override = $parms->override; # which Options are allowed by AllowOverride (since Apache 2.2) $override = $parms->override_opts; # the path this command is being invoked in $path = $parms->path; # this command's pool $p = $parms->pool; # this command's configuration time pool $p = $parms->temp_pool; } Description "Apache2::CmdParms" provides the Perl API for Apache command parameters object. API
"Apache2::CmdParms" provides the following functions and/or methods: "add_config" Dynamically add Apache configuration at request processing runtime: $parms->add_config($lines); obj: $parms ( "Apache2::CmdParms object" ) arg1: $lines (ARRAY ref) An ARRAY reference containing configuration lines per element, without the new line terminators. ret: no return value since: 2.0.00 See also: "$s->add_config", "$r->add_config" "check_cmd_context" Check the current command against a context bitmask of forbidden contexts. $error = $parms->check_cmd_context($check); obj: $parms ( "Apache2::CmdParms object" ) arg1: $check ( "Apache2::Const :context constant" ) the context to check against. ret: $error ( string / undef ) If the context is forbidden, this method returns a textual description of why it was forbidden. If the context is permitted, this method returns "undef". since: 2.0.00 For example here is how to check whether a command is allowed in the "<Location>" container: use Apache2::Const -compile qw(NOT_IN_LOCATION); if (my $error = $parms->check_cmd_context(Apache2::Const::NOT_IN_LOCATION)) { die "directive ... not allowed in <Location> context" } "cmd" This module's command information $cmd = $parms->cmd(); obj: $parms ( "Apache2::CmdParms object" ) ret: $cmd ( "Apache2::Command object" ) since: 2.0.00 "directive" This command's directive object in the configuration tree $directive = $parms->directive; obj: $parms ( "Apache2::CmdParms object" ) ret: $directive ( "Apache2::Directive object" ) The current directive node in the configuration tree since: 2.0.00 "info" The extra information passed through "cmd_data" in "Apache2::Module::add()". $info = $parms->info; obj: $parms ( "Apache2::CmdParms object" ) ret: $info ( string ) The string passed in "cmd_data" since: 2.0.00 For example here is how to pass arbitrary information to a directive subroutine: my @directives = ( { name => 'MyDirective1', func => &MyDirective, cmd_data => 'One', }, { name => 'MyDirective2', func => &MyDirective, cmd_data => 'Two', }, ); Apache2::Module::add(__PACKAGE__, @directives); sub MyDirective { my ($self, $parms, $args) = @_; my $info = $parms->info; } In this example $info will either be 'One' or 'Two' depending on whether the directive was called as MyDirective1 or MyDirective2. "method_is_limited" Discover if a method is <Limit>ed in the current scope $is_limited = $parms->method_is_limited($method); obj: $parms ( "Apache2::CmdParms object" ) arg1: $method (string) The name of the method to check for ret: $is_limited ( boolean ) since: 2.0.00 For example, to check if the "GET" method is being "<Limit>"ed in the current scope, do: if ($parms->method_is_limited('GET') { die "..."; } "override" Which allow-override bits are set ("AllowOverride" directive) $override = $parms->override; obj: $parms ( "Apache2::CmdParms object" ) ret: $override ( bitmask ) the allow-override bits bitmask, which can be tested against "Apache2::Const :override constants". since: 2.0.00 For example to check that the "AllowOverride"'s "AuthConfig" and "FileInfo" options are enabled for this command, do: use Apache2::Const -compile qw(:override); $wanted = Apache2::Const::OR_AUTHCFG | Apache2::Const::OR_FILEINFO; $masked = $parms->override & $wanted; unless ($wanted == $masked) { die "..."; } "override_opts" Which options are allowed to be overridden by ".htaccess" files. This is set by "AllowOverride Options=...". $override_opts = $parms->override_opts; Enabling single options was introduced with Apache 2.2. For Apache 2.0 this function simply returns a bitmask with all options allowed. obj: $parms ( "Apache2::CmdParms object" ) ret: $override_opts ( bitmask ) the bitmask, which can be tested against "Apache2::Const :options constants". since: 2.0.3 "path" The current pathname/location/match of the block this command is in $path = $parms->path; obj: $parms ( "Apache2::CmdParms object" ) ret: $path ( string / "undef" ) If configuring for a block like <Location>, <LocationMatch>, <Directory>, etc., the pathname part of that directive. Otherwise, "undef" is returned. since: 2.0.00 For example for a container block: <Location /foo> ... </Location> '/foo' will be returned. "pool" Pool associated with this command $p = $parms->pool; obj: $parms ( "Apache2::CmdParms object" ) ret: $p ( "APR::Pool object" ) since: 2.0.00 "server" The (vhost) server this command was defined in httpd.conf $s = $parms->server; obj: $parms ( "Apache2::CmdParms object" ) ret: $s ( "Apache2::Server object" ) since: 2.0.00 "temp_pool" Pool for scratch memory; persists during configuration, but destroyed before the first request is served. $temp_pool = $parms->temp_pool; obj: $parms ( "Apache2::CmdParms object" ) ret: $temp_pool ( "APR::Pool object" ) since: 2.0.00 Most likely you shouldn't use this pool object, unless you know what you are doing. Use "$parms->pool" instead. Unsupported API "Apache2::CmdParms" also provides auto-generated Perl interface for a few other methods which aren't tested at the moment and therefore their API is a subject to change. These methods will be finalized later as a need arises. If you want to rely on any of the following methods please contact the the mod_perl development mailing list so we can help each other take the steps necessary to shift the method to an officially supported API. "context" Get context containing pointers to modules' per-dir config structures. $context = $parms->context; obj: $parms ( "Apache2::CmdParms object" ) ret: $newval ( "Apache2::ConfVector object" ) Returns the commands' per-dir config structures since: 2.0.00 See Also mod_perl 2.0 documentation. Copyright mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0. Authors The mod_perl development team and numerous contributors. perl v5.18.2 install::TempContent::Objects::mod_perl-2.0.9::docs::api::Apache2::CmdParms(3)
All times are GMT -4. The time now is 03:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy