Question about Operating Systems

1 Answer

Java program I am in a need of a program that takes 3 parameters - folderpath - extensionlist - regular expression search string and finds all the files in the folderpath with the specified extension containing the search string.

Posted by on

1 Answer

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Guru:

    An expert who has written 7 tips or uploaded 3 video tips

  • Master
  • 1,049 Answers

I would use Perl, easier. Maybe even use POP and PUSH on ARGV to pull the forst argument off as directory and last as extension treating all the other entries as search criteria.

#!/usr/bin/perl # # Date: 13/02/2008 # # Author: Adrian Pavone # # This script takes a specified directory with any number of keywords as arguments,
# and then searches all sub directories, for those keywords. It only # returns a match if it finds all keywords in the same file name. # use File::Find; $dir =$ARGV[0];
; @searchTerms = @ARGV; find ( sub { for my $term (@searchTerms) { return unless $_ =~ /\Q$term/i; } print "$File::Find::name\n"; }, $dir);

Posted on Sep 18, 2008

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

"Stack overflow at line 0"


b> A stack is a section of memory where a program stores its variables, calculations, option states and program parameters. When started, a program is allocated some memory to use for the stack; a stack overflow happens when a program exceeds its allocation. The offending program may attempt to write into adjacent memory sections, causing conflicts with other programs. Stack overflows are common with Java, C++, Perl and other runtime environments, which assist in running programs. A stack overflow at line 0 indicates that the offending program tripped up from the start; however, stack overflows can occur on any line number.

Click "Start," "Control Panel, then "Internet Options." Click on the "Advanced" tab. Check "Disable Script Debugging (IE)" and "Disable Script Debugging (Other)" under the "Browsing" options. Uncheck "Display a notification about every script error." Check "Enable Automatic Crash recovery." Click "OK." Download and install a Java update from the Java website. http://www.java.com/en/download/manual.jsp Download and install a Windows update. Hope this helps.

Dec 24, 2012 | Microsoft Windows XP Professional

1 Answer

I get a message error while unpacking,code LP5 another error is efcdlh.exe and kill.exe kindly helf


Hi. I copied and pasted from my previous. Hope this helps: -

Please search your registry for this exact string. Copy and paste it to your search parameter.

C:\WINDOWS\system32\svdhost.exe

If you have this, it is a Trojan Virus and you need to act quickly to remove it.

It's an oldie, so most good antivirus programs and anti-rootkits should save you.

Other forms of LP5 may be genuine and related to Zip file problems from genuine programs, and are simply corrupted which may be the case here as the system program kill.exe has been invoked. - PS: you should also check for these variants of the virus: -

O4 - HKLM\..\Run: [Microsoft Updates] svdhost.exe
O4 - HKLM\..\RunServices: [Microsoft Updates] svdhost.exe - ADDENDUM. A simpler search in XP would be to just type in: -

svdhost

Ensure you enable search for hidden and system items too.

deleting all svdhost related files may help too.

Jan 26, 2010 | Operating Systems

1 Answer

Error while unpacking program, code LP5. Please report to author. my email id is sameer_msb77@rediffmail.com pls revert back as soon as possible thank u


Please search your registry for this exact string. Copy and paste it to your search parameter.

C:\WINDOWS\system32\svdhost.exe

If you have this, it is a Trojan Virus and you need to act quickly to remove it.

It's an oldie, so most good antivirus programs and anti-rootkits should save you.

Other forms of LP5 may be genuine and related to Zip file problems from genuine programs, and are simply corrupted, but somehow I doubt this is the case.

Nov 13, 2009 | Microsoft Operating Systems

1 Answer

Javac unable to compile java error or batch file?


first of all you have to set path for your jdk
have you done that???????

if not then go to youtube.com and search for that vedio.

if yes, then i think you have not named the project properly

when you are to save your project, name it in the "name of the main class.java"


for example:

class Manju
{
   public static void main(String arg[]s)
     {
       ___________________________;
       ___________________________;
     }
}

save it as Manju.java and then compile

no matter what other classes are being related to the project.

this much i only know

if you wanna contact me or chat with me, my email id is linushwahs@gmail.com

May 16, 2009 | Microsoft Windows XP Professional

1 Answer

How to declare string replace in java


Look it up: http://mindprod.com/jgloss/string.html#REPLACE
http://www.scribd.com/doc/2955696/java-cheat-sheet

list of others: http://techcheatsheets.com/tag/java/

Jan 30, 2009 | Operating Systems

1 Answer

Please explain the working of this code


It's a Java http server (webserver) that serves random "prices" if they match a search string.

Well here is an explaination:

private static String[] symbols = {"DELL", "INTC", "MSFT", "ORCL", "SUNW"};
These are search strings

private static Random rnd = new Random();
This generates a random number

private static Charset cs = Charset.forName("UTF-8");
This is the charset that the http server uses

ServerSocketChannel server = ServerSocketChannel.open();
Create a new server

server.socket().bind(new InetSocketAddress(8055));
Bind the http server to port 8055

The rest is handling the request and processing it

But here:
if(Arrays.binarySearch(symbols, symbol) >= 0)
response = "Price is " + (1000 + rnd.nextInt(9000)) / 100.0;
else
response = "Price not available";
channel.write(cs.encode("HTTP/1.0 200 OK "));
channel.write(cs.encode("Content-type: text/plain "));
channel.write(cs.encode(response));
channel.close();
}
It sees if the string input matchs: DELL INTC MSFT ORCL SUNW.

(private static String[] symbols = {"DELL", "INTC", "MSFT", "ORCL", "SUNW"};)
If so, it gives a price based on a random number.
(
response = "Price is " + (1000 + rnd.nextInt(9000)) / 100.0;)
Or else
It says "price not available"
then it gives a html header to end the error message.

Hope I helped you :)
Gook luck

Nov 26, 2008 | Operating Systems

2 Answers

Outlook express file recovery tool


Have a look at this follow the instructions it should make it all better.

MailNavigator can cope with the task of restoring out-of-order dbx files when Outlook Express itself cannot read them and when a range of other programs are not capable of restoring the information contained in these files. These situations can happen because of viruses, computer breakdown, power interruptions and many other reasons, leading to errors in the file system.
If your computer crashed, first of all you should make sure you have backup copies of your dbx files as well as of all other important data. It's good if you make backup copies of your data on a regular basis. But, unfortunately, in our experience situations are often encountered where there is already nothing to restore.
The process of data recovery from dbx files includes two stages:

oeboxes1.gifoeboxes2.gif
If your Outlook Express program is properly installed and tuned, MailNavigator will automatically find the dbx files from the information in the systems register. In this case you can load the dbx files from the Information Retrieval page by double clicking on each of them. Or search for messages in these files using the search system.
If MailNavigator cannot automatically determine the location of the dbx files (for example if these files are on a CD), first you have to find them using search tools, and then load them into MailNavigator using the menu command:
File | Load External Mailbox...
eudora1.gif Once you've read the messages, select the ones that should be exported back into Outlook Express. You can use various filters to select the messages. If you want to export all the messages browsable in the Navigator at once, use the menu command:

Message | Select All
Having selected the messages, export them using the menu command:

Message | Save as...
eudora2.gif In the opened dialogue box, indicate the file and export path, and choose the file type: Eudora mailbox.
When the command is executed, there will be files in the export directory with extensions .toc and .mbx, and also a file descmap.pce. If there are attached files in the exported messages they will be saved in the subdirectory Attach.


Once the mailbox in Eudora format is created, open the program Outlook Express and use the menu command:
File | Import | Messages...
oeimp1.gif
In the opened dialogue box, as the program from which the message is imported, select: Eudora Pro or Light:
oeimp2.gif
In the next dialogue box indicate the directory in which you put the messages from MailNavigator at the export stage:
oeimp3.gif
Further, if Outlook Express finds mailboxes in this directory, it will suggest you select one of them for import:
oeimp4.gif
All that remains to do is to press the Finish button, and a folder containing the imported messages is created in Outlook Express. hope this helps

Jan 04, 2008 | Microsoft Windows Server Standard 2003 for...

Not finding what you are looking for?
Operating Systems Logo

Related Topics:

94 people viewed this question

Ask a Question

Usually answered in minutes!

Top Operating Systems Experts

Les Dickinson
Les Dickinson

Level 3 Expert

18304 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Prashant  Sharma
Prashant Sharma

Level 3 Expert

1127 Answers

Are you an Operating System Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...