|
Thank you.. for the configuration link.. Really it is good..
|
|
|
|
|
Hi all, can anyone tell the command for sharing a folder in ubundu system which i want access from windows xp, both are in network.
Thanks in advance..
|
|
|
|
|
Samba is the tool for that. Just right click on the folder that you want to share and go to "Sharing Options".
|
|
|
|
|
or find the samba config files...
----
Morgan Gangwere
Lead programmer, Unknown Software
"Pinky, are you thinking what im thinking?"
"I Dunno brain, how many licks DOES it take to get to the tootsie roll center of a tootsie pop?"
"You want me to calculate that? or should we take over the world?"
"ooh! OooooOOOooH! lets find out!"
|
|
|
|
|
I need to replace text in all text files in the directory (including sub-directoies).
I have managed to get the following working, but dont know how to combine them!
find . -exec grep –n "oldText" '{}' \; -print
find . -type f -name '*.read' -print -exec sed s/oldText/newText/g '{}' \;
ANy suggestion please, I have done searches, but just want a simple one line command if possible.
Regards,
Andy.
grahamfff
|
|
|
|
|
Using Perl
<br />
perl -pi -w -e 's/oldString/newString/g;' [place]
|
|
|
|
|
Hello all,
First of all I'm a Linux newbie (at much) so be gentle please... :P
I've been able to see that the version control software that the people on the design department is generating a special folder named OBSOLETE for each project.
Inside each of those folders all the data is not important.
I'm trying to delete all the contents inside those folders recursively.
Now I've been able to delete the obsolete folders, and even the help in the software tells me that doing it won't hurt the system... I would like not to do it.
Now I've used:
find . -name obsolete -exec rm -rf {} \;
The problem here is that I also remove the folder obsolete...
Does anyone know what should I write in order to remove the contents of all the obsolete folders and not the folders it selves?
As always, thank you in advance.
|
|
|
|
|
try this:
find . -wholename '.*/obsolete/*' -exec rm -rf {} \;
|
|
|
|
|
Thank you, it worked like charm...
|
|
|
|
|
You can also use xargs: find . -name obsolete | xargs rm -rf
Nevermind...
|
|
|
|
|
Greetings,
I would like to know if anyone has any code or even VB script, Perl etc that can simply be run from a command line to download whatever page is on a browser and write the raw HTML to a file, it can also be MHT for that matter.
I know about using - Navigate etc for a specific web page. This is different. The page I go to require authentication with word art and user name and password etc. Then once there you must click a few times to get where you are going for the data. Therefore running a script to direct me to a certain webpage will not work. The page has to be displayed first and then downloaded.
So, I just want to take whatever is currently on the browser, mainly due to catch refreshes of new data. Understand the page I am getting data from is generated as from a database so I can not simply run a script file to download that page. The program must be able to simple be activated and write to disk what ever is displayed on the browser at the time the program is run.
I have a seperate data extractor to run against the new file to find the data I need. This file can always have the same name as well and be overwritten.
Thanks,
Antone
|
|
|
|
|
Antone Eason wrote: Understand the page I am getting data from is generated as from a database so I can not simply run a script file to download that page.
Of course you can. If the user does it simply to get to that page then you can write a script to do the same thing.
But if you really want to grab the browser then you must use something that interacts with the browser and then some other piece of software, presumably to save it.
Autoit on windows would do that.
|
|
|
|
|
Thank you everyone for all your replies. I have no updates on the issue as I do not have time to pursue this project any longer.
See ya,
Antone
|
|
|
|
|
hi, am building a simple social network, but how can i make each user view only his personal profile, friends in his network, share photos with his netwok without creating for each user his private page. as this will be wastage of computer resources and make the machine slow.
could anybody have some examples on this or know a link to tutorials that can help in this..thank u for your response in advance..
|
|
|
|
|
Check out a piece of software called dolphin, it's the best open source php based social networking software I can think of off the top of my head.
|
|
|
|
|
Use a database such as MySQL.
Steps:
1- Create a input page where they can add info and change profile styles etc.
2- Create the profile page and use posted variables to update the content
i.e.: profile.php?id=1001
and retrieve the info from the database for that user and print it in the profile page.
(So you've made 2 dynamic web pages and 1 database table)
Do the same process for the other pages.
|
|
|
|
|
I have to code php for a public service announcement that :
It is simply a form that has a place to enter your name and announcement. When you click the submit button, the application takes the form data and appends it to a text file. Each time you view the form page, before it presents the form it displays the contents of the file you were saving the data to. I am a beginner and in a hurry.
|
|
|
|
|
|
I'll second fly 904 - good resources.
|
|
|
|
|
Hi everyone,
I'm relatively new to PHP and am experiencing a problem trying to loop through multiple arrays whilst comparing strings during each iteration of the loop.
What I have is two arrays; one with a list of illegal file names and one with a list of filenames pulled from a scandir function. Although it doesnt work this is what im trying to do:
$illegalArray = array(".php", ".html", ".sql");
$filesArray = array("general", "connect.php, "_sql", "test.sql");
foreach ($filesArray AS $f) // Loop through the file names array
{
foreach (illegalFiles AS $i) // Loop through the illegal file names array
{
if (strstr($f, $i) // Check to see if the the string held in $f contains any of the text held in $i
print "illegal file";
else
print "valid file";
}
}
Hopefully that kind of makes sense. Basically I want to loop through the files array, check to see if the file name contains the string held in the illegal array. If it does then do something, if it doesnt, do something else.
I can get it working to the point where it outputs a list of the files that it shouldnt include (the illegal files) but I cant get it to output a list of files that it should include (from the $filesArray these would be the "general" and "_sql" file names).
If anyone can shed any light on what I am doing wrong here I would be eternally grateful.
Thanks for reading (sorry about the length)
Bryant
|
|
|
|
|
What you had was fine, up until the point where you output the file each time it passed a validation check in the other array. eg. 'general' would output 'valid file' 3 times and 'connect.php' would output 'illegal file' once and then 'valid file' twice.
What you should wait for is for all the checks to be done before outputing a result. The following snippet should work fine.
$illegalArray = array(".php", ".html", ".sql");
$filesArray = array("general", "connect.php", "_sql", "test.sql");
foreach ($filesArray as $file)
{
$is_safe = true;
foreach ($illegalArray as $illegal)
{
if(strstr($file, $illegal))
$is_safe = false;
}
if ($is_safe)
{
echo 'Valid File ('.$file.')<br />';
}
else
{
echo 'Illegal File ('.$file.')<br />';
}
}
Outputs:
Valid File (general)
Illegal File (connect.php)
Valid File (_sql)
Illegal File (test.sql)
If at first you don't succeed, you're not Chuck Norris.
|
|
|
|
|
Fly you're a legend. Thank you very very much for that, that has bugged me for almost 2 days (believe it or not).
The beers are on me
|
|
|
|
|
send me the code to insert the data in mysql through php form
|
|
|
|
|
|
from where can i get php projects for beginning level/??
plz send me waqarnaeem2@hotmail.com
|
|
|
|