General :: Writing C Program To Shutdown System?

Sep 12, 2010

I usually download files from internet throughout the night. I can shut down computer automatically using commandshutdown -P timeThis works well ,but very often ,electric supplies cutoffs and system get rebooted and remain booted uselessly.In such case i want to use c program to shut down system after particular time which i will add on startup application list.If i added it on startup application every time i boot the computer it will automatically shutdown after particular time so ,to use the system i should be able to disable that program.

View 1 Replies


ADVERTISEMENT

General :: Detect If A Program Is Writing To A File?

Mar 3, 2009

I have custom software that writes to a sensitive large file when the user does something. I would like to make backup copies of The file that gets written to, but if I make a gzip of the file at the same time someone is changing something, it will corrupt the backup because some of the data will be missing, as its backed up during being written to.

a) Is there a way to detect if a file is currently being accessed/written to?
That way if its currently being accessed, I can just make the script wait until its done and then finally back it up.

b) Instead of backing up the large file while it has potential to get written to, would it be better to make a copy of the file first, then gzip the copy? This idea comes from the fact that gzipping the original takes 5-10 seconds, whereas making a copy only takes 1-2 seconds. The less time, the less chance of corruption.

c) Is there anyway to freeze a program or a file to stop it from being written to for an amount of time?

With a, b, and c together. The best solution I have to my problem would be a script that first detects rather the file is being accessed. If not, it would then freeze the file/program and then make a quick copy of it. Once the copy is created, it will unfreeze the original file/program and then go about gzipping the copy.

View 3 Replies View Related

General :: Writing And Compiling Java Program In Fedora 12?

Mar 21, 2010

how we can we write java programs in java and how we execute it.. to produce output?

View 2 Replies View Related

Programming :: Writing A Mkdir -p C Program

Apr 9, 2011

How to write a mkdir with -p option. I am struggling for creating subfolders. the chdir() is not working and thus subdirectories can't be created.

Code:

View 1 Replies View Related

General :: Shutdown -k +2 System Going Down?

May 10, 2009

I tried the above command on my pc. It broadcasts the message passed , but I noticed one thing that during this time( 2min) normal users are not allowed to login onto the terminal.

View 2 Replies View Related

Fedora :: Tablet / Wacom Note Writing Program?

Jun 12, 2010

I'm looking for a decent program to take notes on my Lenovo tablet laptop. What's your favorite?

View 1 Replies View Related

Software :: Install K3b Disk Writing Program In Ubuntu 11.04?

Jun 27, 2011

K3b provides a comfortable user interface to perform most CD/DVD burning tasks. While the experienced user can take influence in all steps of the burning process the beginner may find comfort in the automatic settings and the reasonable K3b defaults which allow a quick start. If you want to install K3b goto ubuntu software center and type K3b in such box and press install button After installation is over open K3b when you open for first time you will see a box called "Did you know...? read that and press Next button. After reading all close that box and use K3b for CD/DVD burning tasks. You want to Add-ons for K3b select six add-ons and press Apply Changes button that all you can use it now. If you want to install K3b through Terminal window follow the this commands To install K3b

sudo apt-get update sudo apt-get install k3b Preview audio tracks withing the playlist editor is one of the features in K3b, you need to install and start arts sound server for this sudo apt-get install arts artsd & you may need to install mp3 plugin for built-in decoding software. sudo apt-get install libk3b2-mp3 Enjoy now.

View 3 Replies View Related

General :: System Beep On Shutdown?

Aug 19, 2009

after installing linux mint 7, I have been getting one beep on shutdown, a google search on this came back as a ram problem...but then i ran across a bunch of posts on ubuntu forums about one beep on shutdown, with an older version of ubuntu, grep does return some paramter errors, but in the mint bug report page those are listed as : benign ignore. it doen't bother me in the least, as long as it isn't a warning of impending hardware failure.

View 5 Replies View Related

General :: Add Shutdown Under System Toolbar?

Apr 30, 2010

I'm running Ubuntu 10.04, and I like to logout or shutdown or restart my system with system->shutdown just as in Fedora, but it's not there. How can I add this, the only way that I have been using is through the terminal or Crtl-Alt-D, which doesn't has Logout option but Hibernate.

View 2 Replies View Related

General :: Correct Way To Shutdown System While Apt-get Still Running

Sep 9, 2011

What's the correct way to shutdown system while apt-get is still running? apt-get complains about unclean shutdown when I just shutdown computer.

View 2 Replies View Related

General :: Create User To Shutdown System?

Dec 6, 2010

I need create user .when user login --> system go to shutdown .I create this script :

Code:
### Shutdown Script ###
#!/bin/bash

[code]...

View 9 Replies View Related

General :: System Mint 10 Won't Shutdown / Solution For This?

Jan 28, 2011

I have double boot windows xp and linux mint 10 on a dell desktop. from the start, linux mint would not completely shutdown. the windows xp shuts down completely. i have tried the commands sudo poweroff, sudo telinit 0 and sudo shut down -h now. not one works. i also have updated to the dvd version and is updated on everything else.

i do not know how to go to bios or perform any programming tasks. may i then request that instructions, if any, be detailed?

View 3 Replies View Related

General :: System Halts On Shutdown Ubuntu 9.04?

Jul 22, 2009

Just installed Ubuntu 9.04 last night. All seems perfect except on shutddown. It seems to go through all shutdown processes but right about the time you expect the computer to turn off a message says: "system halted [4027.514883]" Have Googled it but no matches. If I just push the on/off button at that point it shuts off immediately

View 4 Replies View Related

General :: Restart System Via SSH Access When Shutdown Not Working

Jul 22, 2011

After NFS mounting some system folders (i.e. lib, usr) of a slave cluster node to /lib & /usr located on the master cluster server I got into some problems: I forgot Ubuntu 10.04 was installed on this particular slave node, while the master node runs 9.10. Now, I am not able to unmount these folders using umount, or restart the system using shutdown, I get some error: " /lib/libblkid.so.1: version `BLKID_2.17' not found". Is there an alternative way to unmount these NFS shares, or to restart the system to undo the mounts? The systems are located elsewhere, so just physically restarting the system would not be the preferred option.

View 2 Replies View Related

Programming :: How To Implement Whole New Writing System

Aug 11, 2010

So basically, there is a really cool writing system I have been working on. It could be viewed (for simplification purposes) like an encryption method for the Latin script.

Facts about the writing system:
It has a little over 300 symbols.
It is syllable-driven.
It is highly compositional (eg. "c", "ca", "cae", "ca " and "ci." all map to different symbols - and NOT by overlaying elements)
Symbols have medium graphical complexity (comparable to Korean Hangul, or Japanese Hiragana)
Has a rather complex set of diacritics (~10, some of which can go on any symbol)
Has no ligatures

How transliteration occurs:
Sequences of Latin symbols map to certain symbols. Example below:[G][rou][p ][hu][g.]Characters sequences between "[" and "]" map to a single symbol (so it would take only 5 symbols to write "Group hug.").

How I want it to work:
I would like to have a daemon that: Intercepts all text displayed on the screen.
Converts it to my writing system (changes letter sequences with individual Unicode codes)
Leaves unsupported symbols unchanged.
Displays all the text on the screen using my font and characters intertwined with the fonts and characters left unchanged.

For example, if you take the following line of C++ code:for (i = 1; i <= n; i++)
I would like it displayed like this:[fo][r ]([i ]= [1]; [i ]<= [n]; [i]++)
Bold-symbols should be in my Unicode font with special symbols defined for this writing system, and the rest should be in its original font and encoding. Also, I would like this encoding to hold for display-purposes only. The data in the memory should remain unaffected. This also means real-time adjustments: if I open a text editor (say, from the OpenOffice Suite) and I start typing, I would like to see what I type encoded with my writing system, even though the document actually contains Latin letters. This also means that the symbol immediately before the cursor may change as you type.

View 3 Replies View Related

Ubuntu :: Terminal Command Or Program To Shutdown Monitor?

Mar 6, 2010

I use Rapidshare a lot to download files and wanted a simple terminal command or program that would shutdown my monitor so I don't have to manually do it.

View 9 Replies View Related

General :: Where To Put Program In File System

Jul 22, 2011

I have downloaded DavMail and its currently living and running from my /home/user/Downloads/DavMail

in this folder is

davmail.jar
davmail.log
davmail.sh
Lib/

[Code]....

I need to put davmail in a better location than downloads but am unsure where to put it, Im guessing if I seperate some of the files/folders such as lib ill have to modify the davmail.sh file.

wheres the best location to keep this or should it remain in my home folder, I was going to put this in

/usr/local/bin
/usr/local/lib

But the jar count as a binary? the .sh certainly wouldnt.

View 2 Replies View Related

Ubuntu :: Inbuilt Logging System - Ran And Installation - Program Opened Automatically - Can't Find Program Executable

Feb 23, 2011

I was wondering whether there is an inbuilt logging system in UNIX?

I ran and installation and the program opened up automatically but I can't find the program executable.

If I could find a log then I could locate this file.

View 9 Replies View Related

General :: Locate Shutdown Log For Linux Shutdown (RHL 5.1-2.6.18-53.el5PAE)

Apr 22, 2010

I cannot locate shutdown log for Linux shutdown to check various activities carried out during shutdown. I can view Startup Log which is availble on console>Applications>System Tools>System Logs.

I have included Shutdown/Startup in dbora, so that Oracle 10gR2 Shutdown/Startup will be automated during OS Shutdown/Startup.

I want to check Shutdown log because Oracle Shutdown was not running, as from $ORACLE_HOME/shutdown.log contains no entries, where as startup log contains latest startup details.

That means here 2 issues are there. One, I want to locate OS Shutdown Log and the other being Why Oracle Shutdown not getting executed.

View 2 Replies View Related

Programming :: Writing On Keyboard Port Via Inb(), Outb() System Calls?

Apr 5, 2010

I am working with fedora 6 , i386 architecture.I am trying to write on keyboard port via program.On inspation i come to know that 0x0060 to 0xz006f are used for keyboard in linux 2.6 kernel in the i/o space from kernel.

#include<sys/io.h>
#include<stdio.h>
#include</usr/lib/syslinux/com32/include/sys/io.h>
#include<unistd.h>
//#define

[Code]...

View 2 Replies View Related

General :: Configure System To Use Theme In X For Program?

May 7, 2010

My program (GTK) runs in Linux (Ubuntu) without any problem and its themes are fine but when I change my system to run just X and then my program, it runs but without any theme. How can I configure my system to use theme in X for my program?

View 2 Replies View Related

General :: Best Anti-virus Program For System?

Jul 21, 2010

Would you have any recommendations for an anti-virus program for Linux? (Ubuntu 10.04)
Thank you in advance for your assistance.

View 3 Replies View Related

General :: Determine What Program Is Listening To Some Port , TCP , UDP In System?

Jan 21, 2010

Is there a way to determine what program is listening to some port, TCP or UDP, in Linux?

View 4 Replies View Related

General :: Run Java Program In System(virtual Machine)?

Jul 3, 2011

How to run java programs on linux .Do i have to install any other software to run java program in my virtual linux system.I use Ubantu.

View 1 Replies View Related

General :: Program Called Keyboard Jedi / Equivalent For System?

Feb 21, 2011

In windows there is a program called keyboard jedi that shows what keys are pressed on the keyboard. is there an equivalent for linux?

View 4 Replies View Related

General :: Command To Compile And Execute Fortran Program On System Machine?

Apr 8, 2010

Command to compile n execute a Fortran program on a Linux machine

View 6 Replies View Related

OpenSUSE Install :: Mount A Live Compressed File System For Reading & Writing From A LiveCD/DVD Image?

Jul 9, 2011

On a Linux CD/DVD, there are compressed filesystem images for the live version for KDE or Gnome for example, but they have no extension, but they are clearly an image file ( compressed filesystem images for the live version before installation ) !!

I was wondering, How do I mount these compressed filesystem images, after I copy the ISO content of the CD/DVD on my system .... I want to edit some files or packages and make some changes, like if I want to customize a live version of gnome for example ! ... ( I know you might be tempted to tell me to use KIWI etc to customize etc ..... ) ... but I want to be able to mount the compressed file system image, then edit it for reading and writing while it is in a subdirectory on its own ... i want to open it ! ... is there a way to do this ??? ... these type of files have no extension ...

i can open this compressed filesystem image then to edit for read & write ... before I roll it back again ..... If and when I succeed .... what should I watch out for ? ... will the same compressed file image but slightly modified work again ?

PS. that same question could be kind of translated or be extended like : how do I use unionfs/squashfs programs on the command line to mount these image files with no extension for read & write mode ???

View 9 Replies View Related

Fedora :: System Shutdown Only Logs Out

Feb 14, 2011

I currently run kernel 2.6.34.7-66.fc13.i686 (sort of). When I select from the Gnome menu System -> Shutdown and select Shutdown from the dialog, my system only logs out, presenting me with the greeting screen. While this is a minor problem and I rarely shutdown my machine, it is mildly disconcerting.I have dropped back to 2.6.34.7-63.fc13.i686 and that shutdowns properly using this method. (Also, 2.6.34.7-61.fc13.i686 works properly). I can imagine that it might close some security issue in which an unauthorized user is able to halt the entire machine. Especially if this is something that will continue in future releases of the kernel.

View 5 Replies View Related

Ubuntu :: System Shutdown Without Any Permission

May 4, 2010

From couple of mins my system shutdowned without my permission I thought I'm infected or something because I installed aMSN so I thought it's because of it, but I checked my syslog and found this:

May 5 00:01:30 spuny-laptop kernel: [ 2441.497050] CE: hpet increasing min_delta_ns to 15000 nsec
May 5 00:17:01 spuny-laptop CRON[1912]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
May 5 00:37:32 spuny-laptop pppd[1560]: Protocol-Reject for unsupported protocol 0xac05
May 5 00:38:15 spuny-laptop pulseaudio[1426]: ratelimit.c: 2 events suppressed
May 5 00:48:06 spuny-laptop kernel: [ 5237.586974] hda-intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.
May 5 00:50:22 spuny-laptop kernel: [ 5373.683347] Critical temperature reached (100 C), shutting down.
May 5 00:50:22 spuny-laptop kernel: Kernel logging (proc) stopped.

Temperature reached is that what cause system halt? Also when I press ctrl+alt+Fn I see blank screen why is that?

View 4 Replies View Related

Ubuntu :: Unable To Shutdown The System?

Sep 10, 2010

I am using Ubuntu 10.04. From last 3-4 days, after updating, I am not able to shutdown the system. I try to use command, but behavior is same Whenever I try to shutdown the system, it exits from desktop environment and a white screen displays on screen. And nothing happened. One time I did wait for 1/2 hr, but system dont seems to power down.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved