Programming :: Disk Overwrite Program In C
Feb 17, 2010
I have to shred a disk from a custom program. Now I open the disk (/dev/sdaX) from a C program and write /dev/urandom to it. But, most of the time the disk is being used by other programs. At least a 5-10 programs will have files opened on that disk. I cannot kill all the programs as some of them are critical. (Now, don't ask me why I am trying to overwrite a disk which is live and being used by some critical programs. Some moron designed it that way and gave me to implement). Sooner or later, write to /dev/sdaX will fail.
Is there any way (may be some flags that I can pass to open while opening a disk for writing) that I can use so that my overwrite continues even if other program is using the disk? (I am not bothered about what will the other program read and process from the disk when this happens)
View 6 Replies
ADVERTISEMENT
Jan 8, 2011
I have reinstalled XP and conseqently messed up Grub and lost Ubuntu. I am trying to do a fresh install but the installer insists on trying to overwrite the whole disk. I downloaded the alternate instal ISO as this has got over this problem in the past but this also wanted to overwrite the whole disk. It recognises the Sata Raid array as being nfts (this is my main data disk) but it doesn't recognise the existing partitions on my main disk:
18G windows
18G Old Ubuntu
113G nfts data disk
View 8 Replies
View Related
May 5, 2010
I have written a spec file for packaging my application in an rpm, but it reports a conflict when I am trying to update my service script in /etc/init.d/. This is a file that I do need to update/replace so how might I force the rpm to do that?
Code:
Summary: A program that increases WAN performance.
Name: packetsqueezer
Version: 0.3.05
Release: 1
[code]...
View 3 Replies
View Related
Feb 15, 2011
I will have to code this. However I am lacking of time since I have too much to do. make a short code bash/dash to prompt the country with Zenity, then, get the PLS or m3u url and prompt with another zenity which radio to play. http://www.listenlive.eu/index.html
My code to get url's radio country.htm is:
Code:
View 2 Replies
View Related
Jan 15, 2010
Ok so Basically i have 2 questions
1. i know how to create a file with c++ using but is there a way to save it to a specific location on your computer with windows and linux
Code:
2. i need to know how to run/execute/open a file in a c++ program im using and its not working
Code:
View 4 Replies
View Related
Feb 12, 2011
im trying to build a simple program for my C programming class, this is the source code
#include <stdio.h>
int main()
{
int length, width, length, height, area, perimeter;
perimeter = width + length + height;
area = width * length + heigth;
[Code]...
i dont see any error (you might)but every time i run it it runs but after it asks me to input for the width i do it but it doesn't take me to the length, it just stays blank until i input another value in the same place for the width, it asks me for 4 inputs in total i don;t know why, and after i run it different times it gives me different values for the perimeter and are. how can I fix this?
View 5 Replies
View Related
May 3, 2010
I am having a problem finding a piece of software. I've searched a lot and still have not come up with an answer. My situation is as follows: I have an image file the I wish to restore to my USB flash drive but so far I've had no luck doing this. I was wondering if there was a program/command that could help me restore the disk image.
View 4 Replies
View Related
Feb 17, 2011
I'm looking for a program that can measure disk latency. I would prefer one that could do it on a raw device. Also reporting average and max latency would be a plus.
Anyone know a program that can do this?
View 1 Replies
View Related
Apr 29, 2010
i need to get the hard disk serial number of my machine using a C++ program.
View 11 Replies
View Related
Feb 8, 2011
I am trying to load vmware server. When running vmware-install.pl it asks where to load the bin files. Default is /usr/bin. Cool with me, so I accept then get the error:
"There is insufficient disk space available in /usr/bin. Please make at least an additional 5924k available or choose another directory."
Ok, so in my searches, most cases people actually do have a full disk. I have 30gb free. Another post somewhere stated it could be the file system used, so I tried different file systems. Now I am back on etx3. What's odd is when I blow away the OS and reload and try to install VMware again, I get a different number to be "freed" in the error. Choosing another directory only yeilds a different disk space request.
View 5 Replies
View Related
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
Sep 4, 2011
Could you suggest feature-rich disk-based personal backup program for Linux (and I've seen a few)?
I want to do nightly backups of the whole system and be able to rollback to any of last 7 days. And, it must be incremental backups. What tool should I use? The tutorials I've read about rsync tell only how to store latest incremental backup and I need last 7.
View 3 Replies
View Related
Nov 22, 2010
adding some program packages doesn't seem to be working out of add/remove, asking me to insert Ubuntu 8.10 _Intrepid Ibex_ - Release i386 (20081030) which i believed to be the 8.1 desktop release i received with the laptop. doesn't recognize it. is this the wrong cd?
View 3 Replies
View Related
Mar 15, 2010
I have now almost completed my aim of using Debian and PClinuxOS on different installed hard disks. For PCLOS I use an On-Disk set of disks which I have installed on a separate hard disk which serves as a repository from Synaptic, which makes program install/remove very quick. Is it possible to do the same thing with the 5 DVD's for Debian lenny on another hard disk?
View 2 Replies
View Related
Aug 20, 2010
I have a lot of RAR files and ISO. Is there a program like Winrar which could open them in Linux? Cause now it only opens zip files . Also I would like to know what the best package manager is (I mean the easiest -used to use the Software Manager in Mint 9 Xfce).At last I would like to know if there is a good program to make disk images to reset the system.
View 9 Replies
View Related
Oct 20, 2010
I am having trouble trying to figure out how to switch over to Ubuntu. I have downloaded the OS to my computer but can't figure out how to put it on my USB flashdrive as directed. It shows how use your USB flashdrive using Windows, Mac and Ubuntu but when I read the instructions for Ubuntu, opensuse does not have the program Startup Disk Creator.
View 9 Replies
View Related
Feb 5, 2009
I found some interesting behavior when discussing the pow function from Math.h with someone. I am well aware of the need to compile with the -lm flag, but to my surprise this actually isn't necessary if the arguments to the pow function are literals. For example, this program compiles in gcc without using -lm:
Code:
#include <stdio.h>
#include <math.h>
int main()
[code]....
If I try to change the call to any of these:
Code:
double bCubed = pow(2.0, e);
Code:
double bCubed = pow(b, 3.0);
Code:
double bCubed = pow(b, e);
Then the -lm option is required or else it can't compile. So does anyone know why it's necessary to use -lm when the argument(s) is/are variable(s) but it works fine if both arguments are literal values? As a side note, any of the above compile with g++ however. Also, if it helps, this is the version of gcc I'm using:
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-44)
This doesn't happen on my Mac however that is running: i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5484)
View 3 Replies
View Related
May 23, 2009
I am new to linux/c programming and I am trying to get TTY id from my c program. Something like this:
int TTYID = get_ttyid();
How do I do that?
View 1 Replies
View Related
Mar 15, 2011
The following is the error in my program :
Here is my program...
View 7 Replies
View Related
Mar 10, 2010
With what functions i can write my program in /etc/init.d with c++ to start every time the computer starts ? (like in windows with RegOpenKey,RegSetValueEx..............) ?
View 4 Replies
View Related
Feb 26, 2010
language:cOs: ubuntuI have googled for a c program to get cpu utilization factor from 2 days.We can get it through "top", "who" commands..But I hav not found any API or a program.
View 5 Replies
View Related
Aug 17, 2010
Am new to this community and this is my first post. am doing a project where i have to develop a wireless ad hoc routing protocol. I have just begun working on the project. I did not know where to start, so started off with a simple chat program using TCP and thought of making the modifications to it later on. But I do have a prob even i running that!
Am not getting the messages in a synchronized manner. The prog is running fine, but the messages that i type from the server are not reaching the client at all, and at times some garbage values are getting printed(When the strcmp()fn returns 1, "connection terminated" gets printed timely in both the sides. this is the oly situation where i do not get garbage values.) am using VC++ 6.0 here.I have been breaking my head for the past 3-4 days for this simple issue. any response to this would be of great help.
View 14 Replies
View Related
Nov 22, 2010
I have checked following two pagesand this page also In following program I want to use attribute keyword of C and format string as printf
Code:
#include<stdio.h>
int myfunction (int ,int);
[code]....
View 1 Replies
View Related
Jun 30, 2010
I want to know how can I make a GUI program from a shell program I coded in C a long time ago. Can anybody point me to good tutorials?
View 4 Replies
View Related
Jan 29, 2011
I'm new to programming under linux (not new to programming). Before that I have written c++ codes in Visual Studio under windows for some years. I read some tutorials and learned editing codes with vim and compile codes with g++ or make tool. And I tried gdb.
But I think compared to my coding experience in Visual Studio, these steps are very ineffective. With VS, after I wrote codes, I just press ctrl+f7 to compile and ctrl+f5 to run the codes. If I want to debug, press f5, and I can see every variable in a 'watch' window.
Under linux, after I write codes, I need to quit vim, type make to compile. If I have some mistakes, I have to remember the line numbers and re-open vim to check the errors. And I think debugging with gdb is so hard.
I think as a newbie to programming under linux, maybe I haven't find the right tools. Or programming under linux is just so hard so a programmer who can overcame these could be strong enough to do programming without some IDE tools?
View 8 Replies
View Related
Dec 20, 2010
I want to make alarm(buzzer) and Lamp(led) to work from infrared sensor output via usb.When ir sensor detect motion it will make the alarm&lamp on. Then also sending mail. Im using pic 18f2550-1/sp(usb Fsio from km2.net).But i dont know how to start the program.
View 2 Replies
View Related
Dec 26, 2010
My Fedora 14 have installed gcc-4.5.1-4.fc14.x86_64,qt-4.7.1-5.fc14.x86_64,
I don't know how to use g++ to compile QT program.
Do I need to set PATH or something else?
View 5 Replies
View Related
Feb 26, 2010
I want to write a program (in C), which does 4 or 6 simultaneous calculation. Is there away of doing something like:
do at the same time{
Core 1 do:
this_thing_1
[code]....
View 3 Replies
View Related
Jun 8, 2009
See the first program below :
Code:
This code when compiled gives the following errors:
1. conflicting types for 'fun' at line no: 9
2. previous declaration of 'fun' was here at line no: 3
Why is this happening?
If i modify the above program as shown in the second program below:
Code:
This code when compiled gives no errors.
Why the difference occurs between the first and second program?
View 8 Replies
View Related
Oct 23, 2010
I have a program called "Device Manager" to manange usb tokens for sending and recieving
multiple data to/from them using shared memory method.Here is a piece of "Device Manager" code:
Code:
int main()
{
[code]...
View 3 Replies
View Related