473,396 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

To find a string in the file which is in the directory which the user has no privilge

directory is /v_dialer
in that i have to find the string v_dialer in all the files as well as subdirectories,
here for some of the files i don't have ownership,how can i use ownership in this context.
reply ASAP
drwxrwxr-x 11 ccvob01 ccgrp01 236 Aug 13 2005 3rdparty
-r-xr-xr-x 1 ccvob01 ccgrp01 4797 Mar 14 13:56 Make.system
-r-xr-xr-x 1 ccvob01 ccgrp01 8488 Feb 17 2001 Make.targets
-r-xr-xr-x 1 ccvob01 ccgrp01 1622 Feb 17 2001 Makefile
drwxrwxr-x 8 ccvob01 ccgrp01 166 Nov 1 2000 admin
drwxrwxr-x 8 ccvob01 ccgrp01 220 Nov 18 2000 blend
drwxrwxr-x 3 ccvob01 ccgrp01 51 Nov 2 2000 custom
-r-xr-xr-x 1 ccvob01 ccgrp01 0 Sep 30 2001 depend.mk
drwxrwxr-x 3 ccvob01 ccgrp01 51 Nov 2 2000 dialer
drwxrwxr-x 4 ccvob01 ccgrp01 74 Nov 2 2000 dispatcher
lrwxrwxrwx 1 root other 16 Apr 17 2001 idl -> ../v_midtier/idl
drwxrwxr-x 2 ccvob01 ccgrp01 3388 Aug 6 2004 include
drwxrwxr-x 5 ccvob01 ccgrp01 98 Nov 2 2000 ivr
drwxrwxr-x 2 ccvob01 ccgrp01 0 Nov 15 2000 language
drwxrwxr-x 16 ccvob01 ccgrp01 400 Nov 17 2000 library
drwxrwxr-x 16 ccvob01 ccgrp01 3563 Apr 30 15:19 lost+found
drwxrwxr-x 2 ccvob01 ccgrp01 0 Jun 28 2001 manbase
drwxrwxr-x 3 ccvob01 ccgrp01 23 Nov 17 2000 pabbase
drwxrwxr-x 6 ccvob01 ccgrp01 120 Nov 2 2000 pdsbase
-r-xr-xr-x 1 ccvob01 ccgrp01 0 Jan 9 2002 purify.mk
-r--r--r-- 1 ccvob01 ccgrp01 17 Oct 17 2006 relcmd.txt
-r--r--r-- 1 ccvob01 ccgrp01 66 May 29 14:54 relcmd_lin.txt
-r--r--r-- 1 ccvob01 ccgrp01 0 May 28 12:06 relcompat_lin.txt
-r--r--r-- 1 ccvob01 ccgrp01 435 May 28 17:04 reldepend_lin.txt
-r--r--r-- 1 ccvob01 ccgrp01 72 May 28 16:34 relerror_lin.txt
-r--r--r-- 1 ccvob01 ccgrp01 84 Oct 17 2006 relmail.txt
-r--r--r-- 1 ccvob01 ccgrp01 83 May 28 16:41 relmail_lin.txt
-r--r--r-- 1 ccvob01 ccgrp01 9 Oct 17 2006 relno.txt
-r--r--r-- 1 ccvob01 ccgrp01 12 May 28 16:34 relno_lin.txt
drwxrwxr-x 20 ccvob01 ccgrp01 606 Nov 2 2000 rls
drwxrwxr-x 2 ccvob01 ccgrp01 87 Jan 28 2001 sdn
drwxrwxr-x 2 ccvob01 ccgrp01 0 Nov 28 2000 soe
drwxrwxr-x 2 ccvob01 ccgrp01 0 Aug 22 2001 tao
-r-xr-xr-x 1 ccvob01 ccgrp01 0 Aug 16 2001 tao_hpux.mk
drwxrwxr-x 6 ccvob01 ccgrp01 128 Feb 14 2001 tools
drwxrwxr-x 3 ccvob01 ccgrp01 51 Nov 2 2000 tzonebase
drwxrwxr-x 2 ccvob01 ccgrp01 0 Nov 16 2004 xalan
drwxrwxr-x 2 ccvob01 ccgrp01 0 Jan 16 2002 xerces
drwxrwxr-x 3 ccvob01 ccgrp01 51 Nov 2 2000 zips
Jun 11 '07 #1
2 1284
KevinADC
4,059 Expert 2GB
what have you tried so far?
Jun 11 '07 #2
miller
1,089 Expert 1GB
ownership doesn't matter. What matters is priviledges. It appears that all of these files are "other" readable, so you should be fine.

Just use File::Find for recursing directories nicely.

perldoc File::Find

- Miller
Jun 12 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Xah Lee | last post by:
suppose you want to do find & replace of string of all files in a directory. here's the code: ©# -*- coding: utf-8 -*- ©# Python © ©import os,sys © ©mydir= '/Users/t/web'
1
by: Matthias Ludwig | last post by:
I'm trying to create a directory on the web server with a vb.net code: .... Dim dirName As String = "w:\filepath\images" If Not Directory.Exists(dirName) Then...
10
by: Sune | last post by:
Hi, previously I used Eclipse CDT for compiling my files just to get started with C and leave C++ behind. Now it's time to get a little more serious so I've moved my files to a new workplace and...
2
by: Rosa | last post by:
Hi, I'm looking for an elegant solution on how to find the youngest file within a given directory. At the moment I'm storing all files in an array and loop through it comparing the creation date...
7
by: Yongsub Eric Shin | last post by:
Hi. I'm just a beginner in ASP.Net. I started writing codes and I keep on getting this Runtime Error page, where it says "Description: An application error occurred on the server. The current...
0
by: haylow | last post by:
Hi I am new to ASP.NET and am working on an application that runs on a webserver. The user will open up the web interface in a browser on their local machine and enter a path to a directory. I...
2
by: John Regan | last post by:
Hello All I am trying to find the owner of a file or folder on our network (Windows 2000 Server) using VB.Net and/or API. so I can search for Folders that don't follow our company's specified...
0
by: Xah Lee | last post by:
Interactive Find and Replace String Patterns on Multiple Files Xah Lee, 2006-06 Suppose you need to do find and replace of a string pattern, for all files in a directory. However, you do not...
2
by: graphicsxp | last post by:
Hi, How can I open all the files in a directory, which names match a particular string ? Say I have a string like 'a file name to find' and I want to find and open all the files of a given...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.