General :: Locate Cmd Couldn't Search File

Jul 7, 2010

I used locate cmd to search file abc.txt (for example) as I didn't know in which directory it would be present and couldn't find it. But when I did find . -name abc.txt, it traced the file, luckily the file was in the same directory. I am wondering how find was able to search abc.txt and locate not. How these two are behavinb differently? Usually I use locate when I don't know the path to the parent dir.

View 8 Replies


ADVERTISEMENT

General :: Couldn't Locate Vmscan.c In Linux/mm/

Apr 7, 2010

there is a file named vmscan.c the location which is given on internet is usr/src/linux/mm/vmscan.c but when i went there , i found only two files ,but there was no vmscan.c so can any one help me to locate the file?

View 1 Replies View Related

General :: Locate And Change All The Search.php Files Permissions To 644 In One Shot?

Apr 18, 2011

I work with this travel company that host sites for different agents. They have ALL the sites in one directory and each site has its own search.php file. How can I locate, and change all the search.php files permissions to 644 in one shot? Is this possible maybe with the find command? I read the man page for this but I am not sure how to write out the command.

View 3 Replies View Related

Ubuntu :: Multiple File Search \ Search A File For A Certain Keyword?

Nov 13, 2010

for example we search a file for a certain keyword..is there any application available which will enable us to search for a single keyword in all the files within the folder ?i want to search for a keyword in about 1000 files..if i do it manually it will take loads of time..

View 6 Replies View Related

General :: Given A File Path Search For File Exist?

Jan 27, 2011

I have file which consists of many files with their path,i need to check for the file exists in the given path,how to check?

View 12 Replies View Related

General :: Locate And Display File But On Another Hard Drive?

Apr 29, 2011

I have to locate and display the findme file on an XFS file system but the file is located on a second hard drive. The hard drives area number sda1 and sdb1know to change a directory, you use the cd command but I cannot remember how to do it for another hard drive. I tried cd /dev/sdb1 but I know that is not correct

View 1 Replies View Related

General :: Web Searches Cannot Locate Way Of Specifying 'each File In Current Directory'

Mar 23, 2011

I have several directories of subtitles for some videos, but all the text for the subtitles in each file is in uppercase, and I would like to convert the files' content to lowercase, all in one go. I found on a website a bash command that would do each file separately:tr '[:upper:]' '[:lower:]' <input.txt> output.txt but of course involves specifying the input name and output name for each file.I have been trying to do it in a script that would work for all files in the current directory, without having to rename them each time, if that's possible. So far I've got the following, which doesn't work:

#!/bin/bash
for file in $@; do
tr '[:upper:]' '[:lower:]'
done

However, my web searches cannot locate a way of specifying "each file in current directory" in conjunction with the "tr" command, but also without having to rename the file once converted to lowercase. Is it possible, or would the tr command have to create a new file for each converted file?

View 3 Replies View Related

General :: Locate Superblocks In An Unmounted Disk Image File?

Feb 7, 2010

I know there are many threads about recovering damaged superblocks. I've spent 3 evenings reading them and trying what they suggest. Invariably the commands do nothing except to report bad or missing superblocks. I've removed the physical disk from the machine and am working with a dd image file (/mnt/image). I can mount what used to be hdc1 and read its files with no problem. I'm trying to recover partions hdc6 and hdc7.$ mmls /mnt/image -b

DOS Partition Table
Offset Sector: 0
Units are in 512-byte sectors

[code]....

View 1 Replies View Related

General :: Runtest Error: Couldn't Find Library File Gcc-dg.exp

Sep 16, 2010

I am trying to run i386 in gcc_test-suite using dejagnu runtest and it fails with error given below. I can see that gcc-dg.exp is in folder gcc-4.6-20100911/gcc/testsuite/lib, but runtest is not searching in this folder.

how to resolve this issue and run only i386 tests.

$ cd /gcc-4.6-20100911/gcc/testsuite/gcc.target
$ runtest -a -tool i386 -verbose
....
....
Looking for library file /usr/local/share/dejagnu/lib/gcc-dg.exp

[Code].....

View 6 Replies View Related

General :: Single Click To Activate Items - Gnome - File Locate Dialog

Jan 21, 2010

I have changed the preference in the Nautilus file manager/browser to "Single click to activate items" and it works.

However, when I run an application, say Totem Movie Player, and select Movie/Open I am presented with a Nautilus like file navigation dialog. This is a common dialog to most Gnome applications - probably part of Gnome. Problem is, the dialog does not respect my "single click..." preference.

I have tested this in Ubuntu 9.10, 10.04 alpha 2 and CentOS 5.4 - I do not think it is distribution related.

View 2 Replies View Related

General :: How To Search File At Server

Jul 16, 2010

1. i want to make backup database(use mysqldump)

2. copy from server(use linux-server) to client PC (use linux- ubuntu 9.0)..

3. before that i want to search that DB file using terminal..

4. bcoz i dont know where the files are located

View 2 Replies View Related

General :: Search For An Element In File

Jul 27, 2009

I have a doubt, i have a file which contains around 3000 elements, now i want to search for an element in that file.what will be the Efficient way of searching ? without consuming much memory and time..

1) is this efficient if i take all the 3000 elements from file to a list or array and sort them and search ?
2) or is it efficient to search directly inside the file ??
Can anyone please suggest some algorithms for an efficient way to search in this case ?I am using C for coding..

View 14 Replies View Related

General :: Install Vmware Player 3.0 - Unable To Locate Kernel File Location In Fedora 14

Feb 1, 2011

I was trying to install vmware player 3.0 and it prompt that it require the kernel kernel-2.6.35.6-45.fc14.i686 to be compile before it start.

Quote:

Kernel headers for version 2.6.35.6-45.fc14.i686 were not found. If you

I try following but unable to find.

Code:

Nothing to do

Code:

Code:

Then I try to map to the file, but not working.

View 3 Replies View Related

General :: Search For A String In A Php File Using `grep`?

Jan 19, 2010

I am searching for Class declaration on a site with hundreds of PHP files, how can I do this in the current folder and subfolders using GREP?

I tested cding to the folder and then something like

grep -r 'class MyClass' *.php

View 5 Replies View Related

General :: Bash Script Search File

Dec 19, 2010

total newb here. call me a script kiddie if you want but here is what i need to do and what i have.

need to:search a hidden log file for a specific string, find what comes after that part, and then output the result to a variable or something that can be used by an application or other script to carry out further actions.

View 3 Replies View Related

General :: How To Search Logs Between Two Timestamps In Log File?

Nov 19, 2009

The requirement was to write a shell script for a cron job set for every two hours for all days.The Script has to scan log files (*.log) for the logs posted only for the last two hours.... and append them in a new file...I am clueless abt how to scan/compare based on time stamp seen in above logs.

View 2 Replies View Related

General :: Search Within A Log File Within A Time Range

Jun 24, 2011

I want to search in my apache log, for events which have occurred say between 11:00 AM to 2:00 PM. I have got few scripts/commands but they are not conclusive, some of then are trying to do an exact match(awk) and for some i am just getting the pattern wrong (eGrep)

I am running RHEL.

Apache log eg:
================================================================
10.92.120.129 - - [24/Jun/2011:01:29:07 -0500] "GET /favicon.ico HTTP/1.1" 302
================================================================

now if i want to find out the logs from 1 PM to 2 PM

some example i had was:

cat <apache.log> | grep -E '07/Apr/20110[1-2]:[0-5][0-9]|02:00)'

small script in which i can pass the start time and end time range, and it should give an output of the rows which fall under that time range.

View 5 Replies View Related

General :: Find Command \ Search File Excluding The NFS?

Jan 20, 2010

I want to search file excluding the NFS ...find / -mount -name 'filename' restricts the search only in the root disc partition,but the file can be in other partitions alsoIs there any way to exclude the NFS only.

View 2 Replies View Related

General :: Search For A File In Multiple Machines Simultaniously?

Sep 15, 2010

Im new to the forum and fairly new to Linux as well. my apologies if this is posted in the wrong section. My problem is How can you search for a file in multiple machines (like a server farm) ? For example i log onto machine num1 and want to search for a file named "xxx.yyy" which may be in one of 4 machnies. What i do right now is manually log into each machine and run the find command. However i have heard that it is possible to do it via a couple of simple commands. I have looked into pssh and cssh as well as ssh tunneling (along with public key authentication to stop the machines requesting a password every time i log in) and unfortunately i was unable to find an answer.

View 4 Replies View Related

General :: Find Text After String Search In File

Aug 2, 2011

I have a file called Regions.ini that looks like this:

Code:
[Granite]
RegionUUID = 54ab7cd2-0e70-49b7-8020-8dbeb84c08d0
Location = 9991,10007
InternalAddress = 0.0.0.0
InternalPort = 9001
AllowAlternatePorts = False
ExternalHostName = 71.171.21.9

[Syenite]
RegionUUID = 8fc56fdd-0afd-4074-9432-0ae8f42b799f
Location = 9992,10007
InternalAddress = 0.0.0.0
InternalPort = 9000
AllowAlternatePorts = False
ExternalHostName = 71.171.21.9
What I need to do is find out what the IP address is after "ExternalHostName ="

After that I will need to compare that IP to whatismyip and if it's different then replace it but that is easy to do with sed. I just can't figure this simple hurdle out.

View 12 Replies View Related

General :: Search For A Specific File In The Sysconfig Directory?

Mar 10, 2010

If i am in the root directory and i need to search for a specific file in the sysconfig directory, is there any way to search this directory for a file?

View 10 Replies View Related

General :: Search For Exact Repetitions In Text File

Nov 23, 2010

I've got a big text file in which I know have probably made some typos (LaTeX). Sometimes I rewrite sentences several times and then end up with double pieces like "the the" or "is is" without noticing it. Most spell checkers that I can use in LaTeX are very basic so they do not notice these grammar errors. Is there a way that I can search for these repetitions by hand using sed or awk or something along these lines? Is there an app for that?

View 3 Replies View Related

General :: Ubuntu - Search Text In Files And Display File Name?

Mar 30, 2011

I am using find some_dir -name "*.some_ext" | xargs -l10 grep "some_expr"

to find files in folder, but I just want to display the file name but not all file content. Any solution?

View 2 Replies View Related

General :: Search (not Browser) History / Where Is File Located In Firefox?

Jan 11, 2010

Is it possible to locate the Firefox file that retains "Search" history (not particularly "Browser" history)?I have lost a hardcopy list of authors and titles of books/ebooks that I search the web for. However, most of the time when I would enter a name or title a drop down list would have that entry I wanted, and I could just click on it. That drop down list is what I am calling "Search" history.

View 8 Replies View Related

General :: Search A File To Find If Variable Belongs To A Field?

May 18, 2011

I have a file that contains 5 fields and anothen one with two I want to take the value from user and search file1 and if the value exists then write in file2 to the $2 to the line that $1=value

file 1
1:fsdfsd:g:33:fsdf
2:yytgdcf:a:3:sgd
3:tttt:g:67:yujhggfg

[code].....

View 2 Replies View Related

General :: Shell Script Which Will Search And Remove A Javascript From All Htm, Html And Php File?

Feb 21, 2011

I need a shell script which will search and remove a javascript from all htm, html and php file.

Code:
<script type="text/javascript"> if (navigator.cookieEnabled) {var user = getCookie("seostop");if (user !=1){winchristop();setCookie("seostop", "1", 7,

[code]....

View 14 Replies View Related

General :: How To Make Grep To Search A Pattern In Only Specific File Type?

Mar 6, 2010

To search a string pattern in all files in a directory and subdirectories, I am using;

Code:
grep -R "myclass::my-func(" mydirectory/
Now I want grep, to search in only specific file types say *.cc. Please help me. I have read manual of grep, but could not deduce any hint.
Best Regards.

View 7 Replies View Related

General :: Shell Script To Search One File For Contents Of Another And Replace Text?

Feb 3, 2011

Suppose I have a pair of files containing lists. The first file is called contigs.txt and it contains a list that looks like this:

Code:
Contig822
Contig826

[code]...

View 5 Replies View Related

General :: Find Command When Loggin As A Normal User And Search For A File Passwd Under?

Dec 25, 2010

when loggin as a normal user and search for a file passwd under /etc. i get few errors with permission denied.how to ignore this permission denied errors.

csh hostname 109 % find . -name passwd
find: ./lvm/backup: Permission denied
find: ./lvm/archive: Permission denied

[code]....

View 4 Replies View Related

General :: Sed/awk/grep Search For Number String Of Variable Length In Text File?

Jan 19, 2010

I need to search a text file for a string of numbers which are different lengths, and always are between number=" and " like:

number="1234567890"
number="22390"

I need to grab those numbers and pipe each one to a line in a file. I've already tried something with awk and that didn't seem to work.

View 10 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved