Programming :: Script Finds No Files?
Oct 27, 2010
I am trying to use sed to replace a bunch of text in several hundred files, so I have this bash script that should iterate through all my files. It looks like this:
#! /bin/sh
for php in *.php; do
./run.sed $php
[code]...
View 10 Replies
ADVERTISEMENT
Jan 19, 2011
can I index files so whenever I do a find somethingdo find / -name libSDL-1.2.so.0It doesn't take 10 mins. I do know there are packages such as tracker but that one does indexing all the time. I would be happy to have something which can be done by hand or something which is done once in 12 hours or so.
View 2 Replies
View Related
Sep 22, 2010
got a whole lot of video files spread among 100's of folders, wondering if Linux has a program that can scan the modification and view dates of them all, and just display what's been accessed most recently.
View 4 Replies
View Related
Jan 4, 2010
i need an application or shell script that can identify all the directories and files in a certain directory and can rename them to remove any spaces in the filenames.anyone know of anything that can do this?
View 9 Replies
View Related
Jan 15, 2011
I accidentally permanently deleted a few files and I was wondering if there was a program that finds the files that were deleted and restores them?
View 4 Replies
View Related
May 5, 2011
I've got problem with Avahi on my laptop. It can see the other machines and services on the LAN but not it's own local services and I have no idea why. The laptop (hostname: forseti) sports Ubuntu 10.10, installed aavahi-daemon, avahi-dnsconfd and libapache2-mod-dnssd. Firewall is disabled. Other hosts on the LAN are: magni (openSuSE 11.4 with lots of services published and visible from forseti) and freya (Ubuntu 10.10 with gnome-user-share up & running). Forseti can see the other hosts and their services but not itself. The other hosts can't see forseti. Checked both with nautilus and CLI's avahi-browse.
View 1 Replies
View Related
Jul 31, 2011
I ran grub-customiser to set default kernel, and saw the GFX mode setting, thinking "Hey, my monitor is native at 1440x900! I'll use that!" ...Didn't think about how the GFX card isn't initialized at that point, so my res is limited to 640x480... So the first problem was a system hang at the grub menu, with "Input Not Supported" displayed on the monitor.I changed the GFX mode back, and ran update-grub, and with a grin on my face, I rebooted. The grin went away fast, when I saw that none of the kernels showed in the grub menu, and I have only the two memtest entries. It appears that, while all the files are still intact, grub is not seeing the kernels. I had an idle partition of about 13 GB on hand, so after trying all sorts of things, I did a clean install on the little 13 GB partition. Still no dice, after doing an apt-get purge grub etc etc etc on my main Ubuntu partition, to make sure that the new grub was running. I still have only memtest, even though I can open the /boot directory and see the kernel files. I tried going into the grub command line and starting manually, but tab-complete does not suggest any of the kernel files, and tells me that the files do not exist, if I type in their full names.
View 6 Replies
View Related
Nov 14, 2015
I am running Wheezy 7.9 (32 bit) and using Gnome Classic desktop. I have recently had several issues with system "crashes" and such, see some of my recent posts, and for now things seem to be working okay. As part of my attempts to "fix" the problems I looked at the hard drive using the SMART disk utility, and also ran "smartctl". The SMART utility reports that there are 3 bad sectors on the drive. When I run fsck, from a live CD, it does not report finding bad sectors. So why would fsck not find something that is reported by smartctl? Which one should I believe?
As a precaution I am now making daily backups of my /home directory and purchased a new HD just in case. Have not yet installed the new HD but at least I am prepared.
View 10 Replies
View Related
Oct 14, 2010
I can't for the life of me figure out why I cannot browse my own shares from my linux boxes. both run OpenSuSE 11.3 I follow swerdna's tutorials and reboot several times but don't have a clue as to whats going on to prevent me from viewing localhost shares or 2nd linux box shares. I get 'unable to mount location, Failed to retrieve share list from server' error when I click on my workgroup icon in nautilus.
View 7 Replies
View Related
May 16, 2010
I need to write a script that can search up to 3 parameters and find all files containing those words. then display them and the amount of hits it got.if the first parameter exists, then we can assume we are looking for the word supplied.if the second parameter exists, then we are looking for files with both keywords.if third parameter exists test the second parameter for the values ('and', 'or', '-v') and search accordingly. These are the only values accepted as the the second one when 3 parameters are present.
lastly, if there are zero or more than three parameters echo as an error and when 3 parameters have been entered we echo an error when the second parameter is not one of the following: 'and', 'or', '-v'.
View 1 Replies
View Related
Jun 6, 2010
Ive installed 10.04 on my laptop and notebook. It works perfectly on laptop. On notebook the problem is it finds no Wireless network and just says disconnected. I have no idea how to connect it, I tried reinstalling Ubuntu but no luck. I tried looking it up on internet but no luck in finding help. its an MSI U130. The wireless is defently turned on.
View 7 Replies
View Related
Oct 1, 2010
Would like to use Ubuntu Tweak on 10.10 beta. Is it safe to remove everything that its cleaning section finds? Or do I have to look carefully at what it removes? Can I just let it remove everything it finds and not worry that something I have installed will be affected?
View 2 Replies
View Related
Dec 4, 2010
I've installed ubuntu on my laptop, but I've got one problem... I can't see my wireless Internet?
On my mac I see my wireless Internet i click on it, put the password in and I'm connected, but on my ubuntu he doesn't show the wireless Internet?
When i connect via cable I've got Internet so i think it can't be my network card because else he wouldn't connect via cable not?
View 9 Replies
View Related
Mar 4, 2011
ClamAV tells me that three of my OpenOffice.org Calc spreadsheets may be infected (status "MBL_144360.UNOFFICIAL", if that means anything). This seems not entirely implausible, since yesterday I used a USB stick to transfer files from a Windows system. Anyway, I'd really like to keep these spreadsheets. Can I disinfect them somehow?
View 2 Replies
View Related
May 20, 2011
So I was the one who couldn't get their ethernet port to function properly. Most likely, this was the result of bad hardware since none of the community's suggestions for software fixes did anything. I believe this is probably true.Indeed, when I bought a cheap $10 wireless USB dongle, it immediately worked better than all the previous things. It detected networks, displayed network strength and even allowed me to attempt login.
The only problem now seems to be that it cannot login. I've rechecked the password countless times, but it just shows the 'connecting to wireless' animation for a minute or two and then poops out and says, 'disconnected'.I assume if everything is getting me this far, the driver is not the problem with the device. Is this a safe assumption?
View 2 Replies
View Related
Mar 9, 2010
i have the huawei 1550 3g modem (prepaid) tele2 and a nokia 5800 both working on on other dists,installed vwdial and vwdialconf finds the nokia and and recognize it as a modem.vwdial connects and hang up kppp same story. what is the deal with the phone? i have all the settings right it should really just work. And the usbmodem it seems like i need usb_modeswitch but i cant compile i properly and the slackbuild is broken/old.
View 13 Replies
View Related
Jan 13, 2010
I bought a Letux 400 mini netbook and it works fine except for wireless Ethernet. It finds wireless networks, including mine, and then pretends to connect, after asking for a password, but finally never connects. I tried reconfiguring the wireless network from g to b/g and finally to b only, but nothing changed. Cable connection works. Unfortunately all relevant Letux Web pages are hopelessly slow and certainly too slow to use the forum and ask questions there. why the thing doesn't connect and how to make it connect? If it recognises networks, shouldn't it be able to connect as well?
View 1 Replies
View Related
Mar 9, 2010
I'm running a syslog server on ubuntu 7.04. Can I somehow have it email me if it finds a certain thing in the log? For example. I'm running a PRI and when the PRI goes down, it logs a "DEACTIVED" in the log. I would like an email telling me this so I know to get on it and fix it.
View 9 Replies
View Related
Aug 12, 2010
FC13 and Ubuntu 10.04 - both 64bit. Hardware: MBP 5,4 Here's how I do the install:
1. Boot to Ubuntu LiveCD and wipe disk.
2. Create a msdos partition table via gparted
3. Reboot from FC13 or Ubuntu install disk and continue to install with installer suggested partition scheme.
4. Reboot and get an error that says "uncompression error -- System halted"
Variation that I have tried:
1. After #3, boot into FC13 or Ubuntu rescue mode, chroot to hd image and run:
# grub
> root (hd0,0)
> setup (hd0)
> quit
2. Create a 250MB partition where I installed refit and use rest of the disk for Ubuntu or FC13. After installation, both Ubuntu and FC13 halt at the same error.
3. gptsync fails with no refit installed. Finds GPT table empty. LiveCDs from both distros work fine so ruling out hardware issues like bad memory etc.
View 1 Replies
View Related
Nov 6, 2010
I have Kubuntu installed under windows 7. It finds my wireless connection and says i am connected. even with a wired connection it does the same. When i go to the web browser and try it out. says problem with connection. will include some pictures of "iwconfig" and others.
View 4 Replies
View Related
Oct 11, 2010
I found this command that works great finding and replacing a simple string to another in files located in that folder and all sub-folders.
Code: find . -name '*.php' | xargs perl -pi -e 's/OldText/NewText/g'
The problem I have is that I need to replace a more complex string, like this: Old string: /mnt/stor6-wc2-dfw1/627896/982574/ New string: /mnt/stor8-wc2-dfw1/369587/302589/ There I don't know how to do it... since the / is what separates the old from the new strings, and the strings that I want to replace have / in it. Also, I would like to know how to specify under what folder replace the files, for example, I want that it search/replaces all files under /var/www/mysite/htdocs folder.
View 1 Replies
View Related
Sep 8, 2009
I need a script that will take all the files in a given directory and create new monthly sub-directories and sort all the files based on the creation date into the appropriate directory.For example, all files created between 01/01/09 and 01/31/09 will be placed in 'JAN-2009'
View 5 Replies
View Related
Sep 19, 2010
In my application I came across a new requirement where I have to convert RTF files to Word and PDF formatted files. I am searching for an API using which my java application can able to convert the above specified formats.
View 4 Replies
View Related
Mar 31, 2011
I need to rename the resulted searched files from a loopI have the following code:
find . -name DOC* | while read i
do
find $i -type f -name '*.txt'
done
basically, I am searching for all txt files inside any folder starting with DOC name.this code is working fine with me.I need to rename those .txt files to .txtOLDOS: Ubuntu 10.4Bash shell
View 10 Replies
View Related
Sep 18, 2010
When is it good to use separate translation units and object files and link them into the main C program, and when is it good to include the header files in the main C program? I don't understand if most people include header files or if most people just link in object files and use their contents in the main program. It's sort of a simple question, but it's confusing to me and that's why I need help with it. I sort of don't understand the difference, or if there's really no difference other than the way the final result is achieved, which way is better or preferred, etc...
For example:
Code:
or:
Code:
Simple explanation of the difference? or which one is preferred or better? I've read a little on the ELF format... so is there no difference in the end result? It's just a matter of preference or necessity, and where the information is to begin with?
View 9 Replies
View Related
Jan 21, 2010
In general I love Ubuntu Karmic, and think it's the most polished Gnome distro out there, but since installing it on my laptop alongside Fedora I haven't been able to boot into the latter.
I know that I could fix it by adding an entry into the 40_custom file, but wonder if there's a simpler fix.
The command
Quote:
sudo update-grub
actually finds and lists the Fedora Constantine kernel, but it still doesn't appear in the bootloader menu. Before I delve around and break something, does this mean that there's a line commented out in one of the config files?
I'm not going to slag off Grub 2 because I can see that it has clear benefits, especially for power users, and I don't mind change if it brings clear benefits. So long, /boot/grub/menu.lst.
View 9 Replies
View Related
Aug 21, 2011
I've got a setup where I need to use 'find' to find 0 or more files in a certain directory, however, 'find' always produces an error when there are no files that match a certain check. Is it possible to run 'find' while having it omit errors when no files match the pattern?
View 2 Replies
View Related
Apr 4, 2011
am writing a small search program for my class. I have decided to use indexing for my program. Ive researched online about indexing and how search engines do it. If im gonno do that I need to create inverted files to associate files to numbers ( numbers being the index of my paths ) . Now I was wondering what would be the best way to create an inverted file ? I was going to create sql tables using mysql api in C but then again there is no array data type or vectors to store few numbers in a single column in mysql and it is not advised to use Enum or SET
View 14 Replies
View Related
May 9, 2011
I'm trying to search the string "Listen" in a few files (config files). I madefind /apps/apache* -exec grep -H Listen {} ;but the result list is very long. How i make a "grep -v" whith this command?
View 3 Replies
View Related
Apr 6, 2011
I wrote a small script, which finds the size of "/" and "/var" FS, if it exceeds 80% it should alert me. The below is my script.
hname=`hostname`
FS="/ /var"
Size="80"
[code]....
View 4 Replies
View Related