General :: Updatedb: Not Always Making Slocate Find All Files?
May 31, 2011Kernel 2.6.21.5, Slackware 12.0
Code:
bash-3.1$ cat /etc/cron.daily/slocate
#!/bin/sh
[code]...
Kernel 2.6.21.5, Slackware 12.0
Code:
bash-3.1$ cat /etc/cron.daily/slocate
#!/bin/sh
[code]...
I want to find files containing the "$" char (ascii 0x24). 'Grep -irl $ *' would output the names of every file in path *, of course, because it means end of line (EOL). So giving grep the string "$" won't do. So I tried 'grep -irl $ *'. But this doesn't work either and I do not understand why. Am I not escaping the dollar sign? grep should interpret it literally. Neither 'grep -irl "$" *' will work. Fortunately, there's LQ, besides grep's man page.
View 9 Replies View Relatedwhen I opened /etc/updatedb.conf it says there in the file that one should make ones own updatedb.local. But how, exactly? Presumably I create /etc/updatedb.local but what do I put into that? With all those $-signs I'm pretty much lost. Could anyone post his/her example of a PRUNE_FS statement or point me to some reference where I can read up on this
View 10 Replies View RelatedHaving gone through the /etc/cron.daily directory I noticed that there is only the mlocate.cron file in comparison to what I have seen on other material where they cite slocate.cron. Is there a difference between these and their respective commands and if so what are they?
View 1 Replies View RelatedIf I want to use the locate command on a Linux machine, I usually run sudo updatedb first to update the database. I can run the locate command on OS X 10.5 but I can't find updatedb. What's the corresponding updatedb for the mac?
View 2 Replies View RelatedI was wondering if there is a way to tell rsync to only apply changes (delete, overwrite,create) only if all files in the file list transferred successfully.Just to clarify, this would essentially be putting a transaction around the transfer.
View 3 Replies View RelatedQuick question. I need to ensure that all my files within specific folders are marked as being read only if the folders name is 'Forms' for example. There may be many 'forms' folders on the server within many different directories.It is a requirement that everything within these folders are marked as being read only but people are not doing so for whatever reason, and would therefore like for it to be done automatically i.e. a script executed by a cron job every eve to esnure that all files within the forms directories are marked read only.
View 1 Replies View Relatedmake a simple script to copy files from my "hfiles " directory to a "www" folder at leats I think its a directory, it has the permissions as "lrwxrwxrwx " but its like a public branch So I proceeded to make a file entittled MkPublic to copy the "hfiles" directory to the "www" branch
here is the code i used:
#!/bin/sh
# COPIES FILES
echo "copying files"
[code]....
when i try to run the script it tells me that there is a syntax error and an unexpected end of file and nothing seems to get copied anywhere so clearly there is something wrong with one im doing, i tried multiple ways : using the quotes, spacing the equal signs, but I seem to still get the same results.
I am trying - to no avail - to take an old script I found in the forum help-needed-in-grep-for-tar-gz-658730/ The code:
Code:
#!/bin/bash
if zgrep $1 $2 > /dev/null 2>&1
[code]....
Google searches for "secure locate Kevin Lindsay" and "secure locate source" do not show any signs of ongoing maintenance, but do bring up a few security advisories related, afaict, to memory corruption. If it's a Google problem, sorry in advance to the maintainer.
View 6 Replies View RelatedI am trying to do a find/grep/wc command to find matching files, print the filename and then the word count of a specific pattern per file. Here is my best (non-working) attempt so far:
wc `find . ( -name "*.as" -o -name "*.mxml" ) -exec grep -H HeightResizableList {}` ;
Is there a way to specify to find that I only want text files (and not binary files)? Grep has an option to exclude binary files, so I thought find probably has a similar feature, but I've been unable to find it.
View 2 Replies View RelatedI know how to search for normal files but can you let me know " How to search for 5 setuid files on the system. Also explain, for each file, why setuid mechanism is necessary for the command to function properly"
View 1 Replies View RelatedUntil now i haven't had to dabble with bash scripts.
I have a program that reads in data files. These are named datafile01_R, datafile01_G, datafile01_B, they then increment, so datafile02_R etc i have about 600 of these. the program reads in 3 data sets at a time from each run, so files_01 r, g, and b.
The program then does its magic, and outputs about 40 different files, depending on the file, they gone to folders named R, G, B, psa, or tracking.
The program itself has configuration files to say where the files should gone when analyzed, there is also the config files that reads in the data sets.
At the moment i have to run one set of data, then go in and manually change the input file location, and run again. But, doing this, even though a different data set, the new set overwrites the old set in one of the output folders. So i need a way to increment the output filenames after they are written and before the program is run again with the new data set.
I know I can do find . -type f, but that includes binary file and I couldn't find a way to exclude them with find
View 4 Replies View RelatedOn SuSE 10.0 I used to have an app simply called, "Dictionary" and it was placed in the Office > Database section of the kicker menu. I can't seem to find that app anywhere for OpenSUSE 11.2. Did they stop supporting/making it?
View 3 Replies View RelatedI have a Toshiba laptop and Toshiba netbook (both Intel chipsets). Laptop - Squeeze install gave me the 2.6.32 kernel and sound only worked thru headphones but not the speakers. Later on, I compiled kernel 2.6.36.1 (and just imported .config from original kernel) and sound WORKED perfectly. I had a few other errors ("address space collision" / PM error) so recently I compiled kernel 2.6.38, which solved other hardware issues but sound is back to original problem (works thru headphones but not thru speakers). I even installed the "backports" kernel (2.6.38.4) and it didn't make a difference.
Netbook - Did exact same things as above but no matter what, the sound never worked on it... same issue (sound in headphones.. no sound in speakers) So, how do I "reverse-engineer" the laptop working sound install with kernel 3.6.36.1 and make it work with later kernel (nothing... and I've tried about 30+ thread suggestions makes the sound cards work properly.. other than kernel 2.6.36.1)
Is it possible to disable the run/display/cancel dialog just for some selected files and keep it for others? I want to be able to just click on some files which would run them instantly yet still being asked what to do if I click on other files. Say, launching files a, b & c would make them execute but launching files d, e, f and all others would pop-up the dialog asking me what to do. So can it be done?
View 6 Replies View RelatedI want to use updatedb to index an external hard disk drive. I mount the drive under /media/external and removed '/media' from the PRUNEPATHS in /etc/updatedb.conf file.This works and I can search for files when the drive is not connected using slocate. However it takes sometime to index the drive and I do not want updatedb to run on its own (if it ran while external is disconnected well...) and seeing as the box in question is on 24/7 if it should run by itself it will most certainly ruin the slocate db.I was thinking of plugging the drive in and running updatedb again, once completed will this work
Code:
# slocate '/media/external' > ext_file_list
and then to find a file even when external is disconnected
[code]...
I have been trying to find a solution for my problem but I can't find it.
Does anyone know how I can add my external HD (USB 400GB) to the "updatedb" so I can find files in my hard drive? code...
I have a lot of mp3 files without any ID3 tag information. This is very annoying, because my iPod does not show them correctly. My Banshee shows them as "unknown artist" and the title. I would like to find them all in a bunch to batch update them.
View 2 Replies View RelatedWe have a huge amount of duplicate files in a folder and I would like some pointers on to writing a bash script to create a list of the duplicate files. I've seen examples that check for the md5 sum of files... but I dont need that, the file name is enough.
View 4 Replies View RelatedSay someone logs into a Centos Linux box and SCPs a file from /root/ called 'textfile.dat'
Is there any way to log into the Centos Linux box, later, and see that textfile.dat was SCP'd from the box?
I used following command to sort one day older log files
Quote:
find /opt/TimesTen/tt_transaction_log/ -name "mtsDB.log*" -mtime +1 -print
following are log files which are existing, I have to delete one day older files from this location but when use above mentioned command it won't print one day older files, as i understand "-mtime" modified time, "+1" means one day older. am i correct?
Code:
-rw-rw-rw- 1 ablddb dba 268435456 May 30 17:11 mtsDB.log126985
-rw-rw-rw- 1 ablddb dba 268435456 May 30 17:17 mtsDB.log126986
-rw-rw-rw- 1 ablddb dba 268435456 May 30 17:23 mtsDB.log126987
[code].....
How can i print one day older logfiles?
To find the space occupied by files modified more than 4 years ago, i tried following.I am wondering if it is right ?
Code:
find /temp -type d ! -name ".*" -mtime +1460 | wc -l |du -sh
I tried this, but this sits there for long time (of couse the path i tried has lot of files) So i am not sure if this is right.
P.S.:
SHELL=bash
OS=RHEL5
find text within files? detailed at Code: man grep
View 2 Replies View RelatedHow can I find big files on the my Linux disk with say more than 500MB in size?
View 2 Replies View RelatedI'm trying to find all java files in bash that contains the method "assign()".I would like to retrieve the same list except without the Test* files. How can I do that?
View 3 Replies View RelatedI just upgraded to 10.10 (everything was working fine in 10.04). I have .jar files that in 10.04 would execute with OpenJDK. Now I get an error message, telling me that it is blocked:
"The file '[path]' is not marked as executable. If this was downloaded or copied from an untrusted source, it may be dangerous to run. For more details, read about the executable bit."
I try to set it as executable like it was before, and it's a no go. My checkmark takes then quickly disappears before my eyes.
Does anyone use Ubuntu to make (video) DVDs? That is, not just burn an existing .iso, but take a number of video files (e.g. mpeg) and create a playable DVD from them.
View 2 Replies View Related