Programming :: File Close Failed?
Mar 8, 2011I am creating xml file by
File f1 = new ("Data.xml");
f1.createNewFile();
Then writing into it by using
[code]....
I am creating xml file by
File f1 = new ("Data.xml");
f1.createNewFile();
Then writing into it by using
[code]....
i am trying to install symantec endpoint on a linux server by this command rpm -ivh sav-1.0.3-8.i386.rpm but it gives me the following error error: unpacking of archive failed on file /opt/Symantec/bin/navdefutil;4ceb8d6b: cpio: mkdir failed - No such file or directory
View 3 Replies View RelatedI was attempting the pear installation as per the instructions given here:url
I think i got the installation correct.
Then i tried this program
<?php
require_once 'System/Folders.php';
$sf = new System_Folders();
$home = $sf->getHome();
echo "$home
";
?>
and compiled it as follows:-
php spear.php
to get the results as
Warning: require_once(System/Folders.php): failed to open stream: No such file or directory in /var/www/spear.php on line 3
Fatal error: require_once(): Failed opening required 'System/Folders.php' (include_path='.:/opt/ZendFramework/current/library:/usr/share/php5:/usr/share/pear') in /var/www/spear.php on line 3
how should i correctly set the path in /etc/php5/apache2/php.ini
or how correct is my path statement
include_path = ".:/opt/ZendFramework/current/library:/usr/share/php5:/usr/share/pear"
in /etc/php5/apache2/php.ini
I'm doing a script to make some task but I would like to know how can I do the part to check the bu.log ? Cause if the files exists it will send me an email with the log, but when the file doesnt exist it will send a blank emal that why i would like to 'check the file' and if there isnt will end it.
#!/bin/sh
x="$HOME/bu.log"
if [ $x ]; then #if the file exists will do
for file in *.log
[Code].....
How can I edit the funcion to check if there isnt an arq.log and close the script?
I have found a weird behaviour on a linux application. A tty seems to get closed without calling close. The program is (very simplified) as follows:
Process 1:
configure_signals()
read_config_files()
create_threads()
wait(forever)
Thread 1:
fd=open(/dev/ttyXX)
usleep(a while)
config(fd)
I have spent quite a lot of time on this problem. It seems like the file is sometimes closed when reaching config(fd), but removing the usleep(a while) seems to remove the problem.
How to safely close all GUI apps from a script (including waiting for the user to respond to save/discard/cancel dialogs)?
View 14 Replies View Relatedi created one thread in main(). I have while in thread function.
I want close the thread in main after some time. How can i close it.
I have a configuration file I put ndd commands into for servers settings and I'm running into and issue where they are only off by one character so I keep overwriting the setting.
The file has these two lines in it:
As you can see the only difference is the q0 on the one entry. With the code below I just keep changing/adding a line to the file and not just finding and fixing the each line. I cannot seem to find the right "terminator" for an exact match. I do understand why it's doing it, I just don't know what to do to fix it. What am I missing?
In the end I just want to search this file and make sure these two lines are in there and set properly.
i've written a socket server. when i launch a client, it connects to servers running on various machines on my local network, which then reply to the client with some string messages, and the client exits.
however, when i launch the client repeatedly (say 5 or 6 times in quick succession) the client is unable to bind to its local port. this appears to be because servers are still trying to connect to the client machine's port, even though the client exited and shut the socket down. the actual error i receive is "Error binding socket to 192.168.1.6:44561: Address already in use".
so, is it enough just to shutdown and close a socket? is there some way that in doing so the client machine can send a CONNECTION_REFUSED message to any machine trying to connect to it? i am using PHP, not that that should make much of a difference i hope.
the problem resolves itself after around 20 seconds as the machines trying to connect to the client timeout. i still need to fix this issue though.
in shell ,i can usegedit /home/test.txtto open my file /home/test.txti want to know ,in shell how to use command to close the file which gedit edit?
View 2 Replies View Relatedi would like to be able to close an instance of the "File Browser" in a terminal command. This needs to be done without killing nautilus completely.
View 2 Replies View RelatedI am trying to get bash script using zentity to exit if the user presses the cancel or close buttons.The exit codes are working fine; they read 1 or 0 depending on the status but it always assumes 0. This is the portion of the script: PHP Code:
function settings(){
result=$(zenity --height=30 --width=300 --list --checklist --title='Selection'--column=Boxes --column=Selections --column="Options"
[code]...
I was installing PECL extension. i have downloaded the setup. then whatever process is mension in this link i have done that. PHP: Installation - Manual. when i m doing patch <patchfile i m getting this patching file ssh2.c Hunk #1 FAILED at 477. 1 out of 1 hunk FAILED -- saving rejects to file ssh2.c.rej
View 1 Replies View RelatedI'm running
Opensuse 11.2
Kernel Linux 2.6.31.12-0.2-desktop
GNOME 2.28.2
I have an instance of Nautilus File Browser that will not close or be killed, and it always opens to the same directory, kdenlive in my home directory.
Rebooting, logging out and in as someone else, then logging back in again as myself doesn't stop it. And, I'm afraid to uninstall Nautilus. I've tried Re-installing it to no avail.
I'm running
Opensuse 11.2
Kernel Linux 2.6.31.12-0.2-desktop
GNOME 2.28.2
I have an instance of Nautilus File Browser that will not close or be killed, and it always opens to the same directory, kdenlive in my home directory. I'm a newbie and have already googled. Rebooting, logging out and in as someone else, then logging back in again as myself doesn't stop it. And, I'm afraid to uninstall Nautilus. I've tried Re-installing it to no avail.
my partitioning layout was as follows
Vista Recovery
Windows 7
GRUB
Extended
-->Fedora 12 (ext4)
so, I shrunk my recovery in Windows 7 successfully, and booted into my Fedora 12 live cd to run Gparted, and move the partitions so that the free space could go towards fedora, I did such, and then I couldn't expand the partition to my dismay. Next, I woke up this morning, tried to boot to fedora to run SSH, grub loaded, but when I tried to boot fedora, I got the "File system check failed" error, and when I tried 7, it just went to a blank screen with a single "_" in the top left-hand corner.
I have iMac 2.4GHz with rEFIT installed. I installed Unity on one of the partition. Kernel is still 2.6.38.8. I am getting error message when I run the command
sudo gedit /etc/x11/xorg.conf
The error message is
(gedit:2139): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.AC7YXV': No such file or directory
(gedit:2139): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory
I think I'm ready to install Linux openSUSE physical on my Laptop. NO VMware Workstation anymore...But before I can do that I must be sure that Linux works on my System.--- SYSTEM ---
System: TOSHIBA Satellite A300D-13A (PSAK4E-01F00VGR)
CPU: 2x AMD Turion� 64 X2 Mobile Technology TL-64
--- NETWORK ---
[code]....
OK, should be enough for the first, ask if I forgot some Hardware...Because I can't find any driver, and I'm not sure. I'm a LINUX NOOOOOOOOOB!!I really want to install Linux openSUSE, I'm MICROSOFT/WINDOWS HATER since 1 month now!! PS: Wine can't start my favorite Programs like Project64 a N64 Emulator. It fails to start a game! I think the graphic plugin crashes... | The exact error message is: "Failed to extract ZIP Archive" or "Failed to load file".
Not sure where to post this, I am runing 10.04 LTS, 64 bit and things have been great, until..... I activated a Ubuntu One account and once I did, my Ubuntu One folder would immediately close upon opening and my downloads folder would immediately close upon opening. I delt with it, no big deal. So I decided that I need to get my crap off the Ubuntu One account so I downloaded them all from the website onto my desktop. Now none of my folders immediately close upon opening and ever couple seconds my desktop flashes and a windows quickly opens and closes stating "starting file manager".
I found a couple of posts the looked like fixes, but nothing has worked. clicked off show_desktop in gconf-editor which stops the "starting file manager", but does not stop the folder from immediately closing. I also found this, [URL]... but I don't know hoe to apply the patch nor if I should. I have tried some other things, but I cant find the threads again to provide. I believe one was the killall Nautilus then apply Linux Essentials, which I don't think even ran at all.
In linking a library in using GCC.
I am compiling Pro*C code.
When the maKe file start compiling if prints following :
Code:
I tried different options but unable to find the reason why it is not linking the libraries correctly.
I was playing around with QT5 today and I am getting the error Gtk-Message: Failed to load module "canberra-gtk-module". Searching suggested that the module may not be installed however it looks like it is to me.
Code: Select allii libcanberra-gtk3-0:amd64       0.30-2.1              amd64    GTK+ 3.0 helper for playing widget event sounds with libcanberra
ii libcanberra-gtk3-module:amd64     0.30-2.1              amd64    translates GTK3 widgets signals to event sounds
ii libcanberra-pulse:amd64        0.30-2.1              amd64    PulseAudio backend for libcanberra
ii libcanberra0:amd64          0.30-2.1              amd64    simple abstract interface for playing event sounds
[code]....
I'm working on a old piece of code on linux, after compiling without porblem at the execution I have this response:
src/xproject/xproject: Ok, a color display! :-)
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 78 (X_CreateColormap)
Serial number of failed request: 7
Current serial number in output stream: 15
looking at the source code I think the problem is related at the depth of my system 24 bit and the depth of this old piece of code 8 bit. Unfortunately also I don't have experience in programming the XVideo and if someone can give me some help in programming the XVideo interface
Im trying to do a remote execution of scripts through SSH in PHP. What im doing:
-Use PHP in conjunction with nagios' check_by_ssh script to execute the script.
-I used
[code]...
-It gives me a 'Host key verification failed' error even though i enabled it to ssh from my server to server01 without password. My Qn: How do i get it to work?
The following command would remove the leading astericks, spaces, slashes, tabs and is present in an awk script.
Code:
gsub(/^[/* ]*/,"")
The above code is working fine when i run in Cygwin on windows machine. But when i run in Ubuntum throws the following error.
Code:
awk: ./Format.awk: line 30: regular expression compile failed (bad class -- [], [^] or [)
^[
awk: 30: unexpected character ''
awk: ./Format.awk: line 30: runaway regular expression /,""); ...
i have problem in socket programming, while displaying received message in file,i got a problem... i cant able to write it in the file.... this is the code....
Code:
/* tcpserver.c */
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
[Code]....
now my problem is run time error i can able to create file but i cant able to write file....log.txt contain nothing.... as here i have give sample code... dont say not initialising function and all.... i have initialised , please only see func1() - my problem is only not able to write msg which i got received from the client..
I downloaded a package from Debian's website with using wireless since I use a Macbook and currently I can only connect through wireless to get internet working. URLs....
When I try to open this with package install it gives me the following error:
Failed to install file..A unspecified transaction error has occurred. More information is available in the detailed report.
I installed OpenCV and am trying the example programs. When I try to compile like in the tutorial it is not finding highgui.h.I have 64 bit Mint if that helps at all
View 3 Replies View RelatedI can define all variables in tcl programming in a file for instance var.cfgand source the same file in my tcl script such assource var.cfgIs this possible in perl too?
View 3 Replies View RelatedInstalling file sharing using eBox and get the following error:
[Code]///
I have installed cups(1.5.3) in my Beagleboard black based custom hardware running on Debian 7.8 using 'apt-get install' command. I am trying to print to HP deskjet 1112 usb printer from system line but nothing is getting printed and the output of 'lpstat -t' shows the error : "/usr/lib/cups/filter/hpcups failed "
The error_log output is :
I [10/Nov/2015:09:44:51 +0000] Saving job.cache...
I [10/Nov/2015:09:44:52 +0000] Listening to [v1.::1]:631 (IPv6)
I [10/Nov/2015:09:44:52 +0000] Listening to 127.0.0.1:631 (IPv4)
I [10/Nov/2015:09:44:52 +0000] Listening to /var/run/cups/cups.sock (Domain)
[code]....
Please find the response from CUPS administrators below:
As far as I see this has nothing to do with CUPS.As far as I see the first error message comes from Ghostscript: "Unable to open the initial device, quitting" (this is in Ghostscript's gs_init.ps file).Therefore Ghostscript does not produce any output which lets then the filter from HP's HPLIP driver software error out with "cupsRasterOpen failed" and finally the HP backend errors out with "ERROR: null print job".Neither Ghostscript nor HP's HPLIP driver software belong to CUPS so that the issue does not belong to CUPS (according to my analysis).
I guess that somehow the "Ghostscript command line" is not correct or does not work as it should.Usually this is alos no bug in Ghostscript but "some where else" where the Ghostscript command line with all its parameters is created.