Debian :: Lenny : Find And Grep "missing" Files?
Aug 24, 2011
i need to scan all files on a dns server (bind 9, lenny) to find a string (192.168) i been suggested to use find with grep i filter out the things i dont need like logs here's the command
find /* -name "slot*" -prune -o -name "var" -prune -o -name "proc" -prune -o -name "log" -prune -o -name "*logs*" -prune -o -name "*history*" -prune -o -type f -print | xargs grep -n '192.168' 2>/dev/null
it show me results with various depth in the directories but it fail to show the occurrence that are in /etc/bind/zones/ if i run the exact same command but with the path being /etc/bind/* the missing occurrence are shown what did i do wrong ?
View 4 Replies
ADVERTISEMENT
Sep 11, 2009
I 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 {}` ;
View 10 Replies
View Related
Nov 2, 2010
I am looking for all the files that contain the text string 'moo.sql'. I ran the following:
find . -name '*.php' | grep -lir 'moo.sql' *
Unfortunately it seems to return non-php files in addition to php files. I thought the find portion of this would filter the file names so grep would only search php files.
View 3 Replies
View Related
Dec 5, 2010
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 Related
Feb 12, 2010
I am new to linux as well as awk, grep or sed. I need a find and replace command single liner or script that loops trough input file (file1) and find the particular input in file2 and add "!" in front of the found string.
Example:
input file: file1
g+h=o+p
a+b=c+d
file2 (file that need to look for)
a+b=c+d1e105
x+y=z+s5e105
g+h=o+pabcdefg
t+r=w+qxvyderf
Output file (file3 should look like this)
!a+b=c+d1e105
x+y=z+s5e105
!g+h=o+pabcdefg
t+r=w+qxvyderf
I have tried many awk and sed method of find and replce but it did not work the way I wanted. This is mainly due to my lack of experience in awk and sed. The program should loop trough file1 and find in file2 and output in file3 for the 1st (g+h=o+p) set then repeat the same process again for set 2 (a+b=c+d).
View 14 Replies
View Related
Mar 20, 2010
Getting the list of files in the root directory that have changed less than 10 hours earlier, using grep, but without the directories.
View 1 Replies
View Related
Jan 13, 2010
Here's my problem: I'm running a Lenny laptop and I need both wifi and virtualbox to work. I had to do a kernel upgrade to run the wifi. It works with either the 2.6.29 or 2.6.30 kernels, but with 2.6.30 I'm having screen brightness issues that I can't seem to get rid of. So I want to run 2.6.29, but virtualbox is a bit of a problem because it requires linux-headers-2.6.29, but when I try to install the amd64 headers it tells me that it cannot install the dependency linux-kbuild-2.6.29. Is there any way I can get that dependency installed on my computer?
View 14 Replies
View Related
Feb 27, 2010
In reply to my last question about Wireless incompatibility in Debian 5.0.3 'Lenny', I found out it was because of missing drivers that I chose to ignore, despite the notifications.Now I've got this problem again, this time with different hardware and a different distribution of Debian (Debian Testing 'Squeeze' i386). As well as asking me to load up ipw2100-1.3.fw (of which I already have), it asks me to load tigon/tg3_tso5.bin. Loading the firmware is no problem. Finding and downloading nthe firmware is the problem here.I've searched through packacges and bug reports for a dowload link, but I've only come across a bundle with the driver I need, as well as a few unneeded extras. IT doesn't work at all.
View 1 Replies
View Related
Nov 5, 2010
Trying to install an XP Pro virtual machine as a guest in VMware Workstation 7.1.2, fails with the error: "Could not open /dev/vmmon. No such file or directory. Please make sure that the kernel module 'vmmon' is loaded".Host OS is Debian-Lenny. Was able to specify the new virtual machine configuration, but VMware failed to create the new image (because of the error specified in previous paragraph).
Is the problem that Debian is not loading/executing a needed process? Should I be directing this problem to either Debian or VMware? I searched the VMware documentation, and it mentioned something about chkconfig (Redhat), or the rcconf/ksysv utilities to change SUSE configuration levels. I am unfamiliar with the syntax, don't know why this is necessary.
View 3 Replies
View Related
May 8, 2010
have you ever encounter such problem that the g2c lib can not be find in lenny debian when using gcc -lg2c ... I have tried several methods but failed to solve it. I use the apt-file search g2c and find that libg2c0: /usr/lib/lig2c.so.0. However, it looks could not work. I wonder if I should install the g77 compiler which is no in lenny, but I don't know how to install g77.
View 2 Replies
View Related
Dec 18, 2010
I could't find the 64bit Debian Lenny OS for Intel architecture.Hence I have installed amd64 and it is working fine.Does both intel and amd have the same 64 bit OS amd64 ?
View 3 Replies
View Related
Dec 31, 2008
How apt-file works.
Background: I (like somebody else) needed to figure out which package wx-config is in.
Code:
Question: Which package makes a link?
Also why wx-common NOT depends on libwxgtk2.6-dev.
View 4 Replies
View Related
Feb 22, 2011
I'm looking for the Lenny CD images on Debian's site and cannot find them. Tried many things, including archive but every time I found myself at the first step.
View 2 Replies
View Related
Sep 15, 2010
I am trying to install Debian Lenny via Hyper-V. I get to the point where it asks for the network card. For some reason it can not find my network card. I have a RealTek (RTL8112L PCIe Gigabit LAN controller featuring AI NET 2 built on motherboard).
For some reason it doesn't see it. My issue is if I continue without the network how am I getting the drivers? Unfortunately Hyper-V doesn't support USB. I guess I can try to burn to CD but not looking to waste a cd for 480k and not sure that will work as I only see a auto.sh and a couple other files under scr directory. If anyone has any ideas please let me know. This is a fairly new Motherboard/NIC so I do not understand why it isn't recognized. I know it cant have everything but Realtek is a fairly common nic.
View 3 Replies
View Related
Oct 19, 2010
Need to make sure a security line is added in to every webpage on a site, trying to find out how to list only the filenames of the pages that are missing the text. awk or grep? o what I want is to list all files NOT containing the word 'securemasthead'
View 2 Replies
View Related
Feb 14, 2010
Today i found out i can not play mp4 files in Lenny! What should i install in order to be able to play this files?
View 3 Replies
View Related
Feb 28, 2011
I have used diff command in past.I faced a situation to which I did not had a cluehere are some text strings (which can be stored in a file)Quote:
CONFIG_XEN=y
CONFIG_XEN_PVHVM=y
CONFIG_XEN_MAX_DOMAIN_MEMORY=128
[code]...
View 3 Replies
View Related
Nov 1, 2010
I am having serious trouble getting Debian to install over our LAN using PXE/syslinux, a custom preseed.cfg, and the files from the DVD on a webserver. I think the problem is using the files from the DVD on the webserver instead of a mirror, but I believe this should be possible. I do not have enough space on the webserver to house an entire debian mirror.
[Code]...
View 10 Replies
View Related
Feb 2, 2010
Is there a program in Debian Lenny to convert swf files to mp3 and ogg?
View 4 Replies
View Related
Mar 18, 2010
I've been having some problems with updating recently. Whether I update using Synaptic, or apt-get, it hangs at the end, and gives various messages as at the bottom of the below apt-get update:
Ign cdrom://[Debian GNU/Linux 5.0.4 _Lenny_ - Official i386 CD Binary-1 20100131-18:53] lenny Release.gpg
Ign cdrom://[Debian GNU/Linux 5.0.4 _Lenny_ - Official i386 CD Binary-1 20100131-18:53]
[code]...
View 1 Replies
View Related
Dec 14, 2009
i was trying to use gnome and kde but i don't like them. I tried xfce and it seem to fit my needs but.My computer is used to be powered on for a weeks. While time passes, a process xfdesktop begin to use more and more memory and to free RAM i need to log out and log in again.
I tried squeeze yesterday on my virtual machine and it has 4.6 and seem not to have that bug, RAM usage is static(yes it still works when i write this and have memory usage 34492k, which is not changing for an hours of usage already), also 4.6 is MUCH better than 4.4.
i already tried adding squeeze to "sources.list" but i can see too many dependencies which should be upgraded if i install 4.6, i'm beginning to afraid it can crash entire GUI(or entire system, i can see there is libc6 required to be updated).
View 14 Replies
View Related
Mar 23, 2011
I have a server hosting 100+ websites. I need to quickly identify which websites are configured with a database. There are way too many to manually check every website for a PHP file with a database name. So, I created a list of all databases from MySQL and put them in a text file. I then exported the text file to a shell variable and used it in a for loop.
bash variable
Code:
DBLIST=`cat dblist.txt`
Example of $DBLIST
Code:
db1 db_testing2 database_clientname production words4cheap
for loop
Code:
for db in $DBLIST; do find . -type "f" -iname "*.php" -exec grep -i $db '{}' ; -print; done
Note: my find statement starts searching at . which is the directory that contains all of my websites and their data, each website is setup in a sub directory, identified by it's domain name.
Example: I'm in /var/www. Beneath /var/www are a list of directories:
[URL]
However, this is taking too long (it's been running most of the day) and I was wondering if there wasn't an easier way to accomplish what I'm trying to achieve?
View 4 Replies
View Related
Jan 10, 2015
While attempting to install 7.7 on i7 Samsung notebook, iwlwifi and rtl_nic files cannot be found on usb or sdc (have no floppy to try) Added the missing files to iso and burned new disc which would not boot.
View 1 Replies
View Related
Oct 27, 2010
I want to write some code to search for a specific string in a text file, but without using grep command.
View 5 Replies
View Related
Dec 15, 2010
if I'd a file like this
something
somethine123
begin something end
begin xyz end
somethingelse
and I want to find the strings only between begin and end, exluding begin and end; How can I grep that?
View 3 Replies
View Related
Dec 24, 2010
For searching a file or directory i normally use grep command. kindly can you guide me the difference between grep and find command. I have used both but that are the difference between them ? are the same or grep is new as comapird to find command.
View 2 Replies
View Related
Dec 1, 2010
I'm trying to use grep to find the words in the dictionary that contain the letters "th" and the letter m.
I tried grep 'th m*.' Desktop/Dictionary/words(Thats where the destined dictionary word document is located)
grep 'th' Desktop/Dictionary/words works but only for the words with th. I have no idea of what expression to use to make it a unionized expression with m
View 3 Replies
View Related
Jun 16, 2010
I have inherited a wordpress theme with a folder of images that I think are no longer being used. I wanted to find the orphaned images using grep, so I wrote this script:
Code:
#!/bin/bash
echo $PWD
for i in *.*; do
cd ..
[Code].....
Its seems like I got some false positives out of it, but it worked pretty ok. I guess. :| Of course, it is not checking for images in the content of the database.
Orphan finding has to be a wheel that is already invented.
View 1 Replies
View Related
Nov 11, 2010
I'm trying to find exact matches of some users in the /etc/passwd file using "grep -w", but it doesn't always work. For example, I have the following users:[URl].. So, let's say, I want to search for the user "stewart" (which doesn't exist)
[Code]...
View 13 Replies
View Related
Jun 21, 2011
Kernel 2.6.21.5, Slackware 12.0
Just after the booting process is finished, running ps I get this:
Code:
As you can see, there are a lot of names beginning with the letter 'k'. Are these processes needed for the GUI to be fully functional when it is run (X Window System + WM + Xfce4)? And can I setup the system such that they're never run?
The reason for this question is that I am testing some programs and need the CPU to have as little time stolen as possible.
View 4 Replies
View Related