Sponsored Content
Full Discussion: locate command alternative,,
Homework and Emergencies Homework & Coursework Questions locate command alternative,, Post 302480033 by ozman911 on Monday 13th of December 2010 09:40:09 PM
Old 12-13-2010
locate command alternative,,

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

Ok, Im back with another small problem. I created a script (the one posted in the last thread). After some help from some members here all is good. The problem is I made it on by using Putty with my Ubuntu server here at my home. Everything works fine on it. But when I load the script on the server for my class, it complains that it cannot find the command locate. I realize this means that the server probably doesnt have KSH isntalled??

Is there an alternative way to search for a file that will output the full path of the file? I have tried find but it doesnt show the full path.


1. The problem statement, all variables and given/known data:
locate $fname

e.g. locate command not found.


2. Relevant commands, code, scripts, algorithms:



3. The attempts at a solution (include all code and scripts):



4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
Lewis And Clark College, Godfrey IL, U.S.A
Mr. Burgess
CNET200

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

command locate.

Hi, I am aware of the command locate/slocate. But when I try to search the file which is located in /tmp. Its not able to get it. I tried by updating the database also with the command updatedb. Is there any consern that the command 'locate' dont check /tmp??? And I knew that locate is the... (5 Replies)
Discussion started by: praveen_b744
5 Replies

2. Shell Programming and Scripting

locate command doubt !!!

Hello, I want to search for a file/directory named "abc" which is located anywhere in the given unix system. I am using the command :- But the problem is that this is giving me all combinations of files with have 'abc' in their name. But can I know the option to be used to get the location... (5 Replies)
Discussion started by: nsharath
5 Replies

3. UNIX for Dummies Questions & Answers

alternative for head command

Hi friends,I am new to unix and this is really a dummy question.but please help me out. How to simulate head command without using head command??? also tail command too,also more command. it is given as a homework to do....please tell me how to do (2 Replies)
Discussion started by: nikhilneela
2 Replies

4. HP-UX

Locate command in HP-UX and Solaris

Previously i worked on linux now i am working on HP-UX and solaris ... I am not able to use Locate command(command not found) in HP-Ux and solaris. Suggest me some options to use locate (6 Replies)
Discussion started by: girija
6 Replies

5. UNIX for Dummies Questions & Answers

Locate command in encrypted home

Hi! I have some files that I want to locate using the locate command in terminal, but my home folder is encrypted using FileVault from Mac OS X 10.6. Any idea how can I locate them, being my home encrypted? (8 Replies)
Discussion started by: tirwit
8 Replies

6. AIX

Locate command

Hello to all, Can I use the "locate" command on AIX 5.3 like on Linux. If yes what packages should I install and where can I find them. Thanks, Enid (9 Replies)
Discussion started by: enux
9 Replies

7. Shell Programming and Scripting

Locate command not working

HI when ever i type the locate command it is saying like below warning: locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old i am using Linux . version is as follows... $ uname -a Linux abc.abc.com 2.6.9-89.35.1.ELhugemem #1 SMP Tue Jan 4... (3 Replies)
Discussion started by: ptappeta
3 Replies

8. AIX

Alternative command for topas

hi, I need alternative command for topas to check cpu %, i tried with ps but their is lot of diffference between the outputs of two commands... Thanks (3 Replies)
Discussion started by: sumanthupar
3 Replies

9. Shell Programming and Scripting

Maxdepth command not working in AIX.Need alternative solution for this command

Hi All, I am trying to select 30 days older files under current directory ,but not from subdirectory using below command. find <Dir> -type f -mtime + 30 This command selecting all the files from current directory and also from sub directory . I read some documention through internet ,... (1 Reply)
Discussion started by: kommineni
1 Replies

10. UNIX for Beginners Questions & Answers

Alternative to cp command

Good Afternoon, I'm backing up a folder from one NAS to another using a unix script using cp. Its a lot of files and takes several days to complete. Most of the files don't change from week to week. Is there a command that would be quicker? Also note, the backup needs to be ready-to-use in... (5 Replies)
Discussion started by: Stellaman1977
5 Replies
MicroMason::TemplatePath(3pm)				User Contributed Perl Documentation			     MicroMason::TemplatePath(3pm)

NAME
Text::MicroMason::TemplatePath - Template Path Searching SYNOPSIS
Instead of using this class directly, pass its name to be mixed in: use Text::MicroMason; my $mason = Text::MicroMason->new( -TemplatePath, template_path => [ '/foo', '/bar' ] ); Use the standard compile and execute methods to parse and evalute templates: print $mason->compile( file=>$filepath )->( 'name'=>'Dave' ); print $mason->execute( file=>$filepath, 'name'=>'Dave' ); Templates stored in files are searched for in the specified template_path: print $mason->execute( file=>"includes/greeting.msn", 'name'=>'Charles'); When including other files into a template you can use relative paths: <& ../includes/greeting.msn, name => 'Alice' &> When a file is included in the template, the including template's current directory is added to the beginning of the template search path. DESCRIPTION
This module works similarly to the related TemplateDir mix-in. However, instead of specifying a single root which must contain all templates, TemplatePath allows you to specify an arrayref of directories which will be searched in order whenever a template filename must be resolved. Using a TemplatePath object, absolute filenames are used as-is. If a relative template filenames or file paths is used, every directory in the specified template_path is checked for the existence of the template, and the first existing template file is used. If a template includes another template using <& ... &>, then the including template's location is added to the beginning of the template search path list, for the resolution of the included template's filename. This allows the included template to be specified relative to the including template, but also lets the template search fall back to the configured template search path if necessary. Supported Attributes template_path An array ref containing a list of directories in which to search for relative template filenames. strict_root Optional directory beyond which not to read files. Unlike TemplateDir, this must be a specific file path. Causes read_file to croak if any filename outside of the root is provided. You should make sure that all paths specified in template_path are inside the specified strict_root. (Note that this is not a chroot jail and only affects attempts to load a file as a template; for greater security see the chroot() builtin and Text::MicroMason::Safe.) Private Methods read_file Intercepts file access to check for strict_root. EXCEPTIONS The following additional exceptions are generated by Text::MicroMason::TemplatePath when appropriate: o Text::MicroMason::TemplatePath: template '%s' not found in path. This indicates that the specified template name does not exist in any of the directories in the configured path. o Text::MicroMason::TemplatePath: Template not in required base path '%s' The template found in the configured template path was not within the configured strict_root directory. This may be caused by requesting an absolute template filename not within strict_root, or by specifying a strict_root which does not match the configured template path. SEE ALSO
For an overview of this templating framework, see Text::MicroMason. This is a mixin class intended for use with Text::MicroMason::Base. For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe. perl v5.10.1 2009-10-27 MicroMason::TemplatePath(3pm)
All times are GMT -4. The time now is 07:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy