Programming :: Created A File With A Pre-defined Size ?

Feb 19, 2010

I have created a file with a pre-defined size as follows:

Code:
#define FILEPATH "testfile"
#define FILESIZE 16

[code]...

View 5 Replies


ADVERTISEMENT

General :: Find Out Maximum Size Of A Image Disk File Created By Kvm-img?

May 22, 2011

I created a VM disk image with kvm-img, but I forget what was the max size of that disk image when I created it. Currently, its size is 6.2G, I want to install some large packages in that VM, so I want to make sure the disk image can expand to an adequate size.

View 1 Replies View Related

Programming :: Including User Defined Header File?

Apr 29, 2011

i got a sample.c which generate a linked list for sorting according to the number generated. then i want to split the sorting function into a header file. and it looks like the sort function in the header file could not access the linked list in the main. the error is dereferencing pointer to incomplete type

sample.c

Code:

#include <stdio.h>
#include <stdlib.h>
#include <time.h>

[code]...

View 2 Replies View Related

Programming :: Know Which File Under The Folder Is Being Opened / Created For Writing?

Apr 23, 2010

My program need to monitor the foler to know which file under the folder is being opened/created for writing. I add the folder into watch list using inotify_add_watch, when a file -- say 'AA' -- is created, I'll get the event through read api call. But the inotify_event only have file name 'AA' and a event mask. these parameters can't help me to know how the 'AA' is created/openned. So I have to scan the /proc folder to get to know how is 'AA' created/openned. I don't think this is a efficient way, especially if there are lots of files are openned/created in a short time span.

View 3 Replies View Related

General :: Partitioning - Difference Between File System Created By Fdisk And File System Created By Mkfs?

Aug 1, 2011

I'm a little bit confused with partitioning the filesystem in Linux. the difference between creating the file system with fdisk and mkfs (when formatting the disk). I can't clearly tell my problem, so please look at this picture:

View 2 Replies View Related

Programming :: Detecting Newly Created Folders / Files On Local File System?

Apr 16, 2010

Using C++, I want to process sub-folders on my home folder sequentially each with a special naming format and containing some binary files in it:

Code:
1/
2/
3/
4/
5/
6/
...

Give above folders, I will process files in 1/ at first, 2/ at second, 3/ at third, and so on.

For some n/ folder, if I realize that n/ actually does not exist in local file system, I do not want to wait for it. Hence I will keep processing (n+1)/ folder, and so on.

However, when processing some (n+m)/ folder, previously not processed n/ folder may have been created on local file system. In this case, I do not want to miss processing it, but somehow detect its creation and process it. After processing n/ folder, I want to continue from (n+m+1)/.

View 5 Replies View Related

General :: Defined Root Partition Not Created A / Boot/efi Partition?

Aug 31, 2010

when I tried to install Fedora on my pc, I got this error message " Defined Root partition not created a / boot/efi partition. I am trying to install it on a seperate hd. My main one has windows xp pro, but I do not want to interfer with that at all?.

View 14 Replies View Related

Programming :: Send The Output Of A Command In A File Defined By A Eval $"$var1"?

Jul 7, 2010

Here is the block of code : (The red part is the code that doesn't work) The file is not created and see the output after the code. # i loop create environment structure and k loop create std procedure sub structure.

for i in TRAX2 TRAX BENCH PROD
do
eval mkdir $"acsayul02501_${i}"
eval chmod 2770 $"acsayul02501_${i}"

[code]....

View 3 Replies View Related

Programming :: How To Know Size Of File In C

Dec 28, 2010

I want to read a file in C, but i dont know the size of the file. Is there any way to find the size of the file in C...?

View 2 Replies View Related

Programming :: Check If Log File Is A Certain Size?

Mar 25, 2010

script that will check if my log file is a certain size? EX: I want to limit the size of my rsync log to say 5MB, if that's true I would move it and create a new one.

View 4 Replies View Related

Programming :: Get Avg File Size In Kbytes

Apr 3, 2010

Using bash, is it possible to get the average file size of each file in a directory of ~2000 files?

View 7 Replies View Related

Programming :: Determine The Size Of File In A Script?

Jun 24, 2010

I have the following which works but think there must be a easier one-liner way of doing this which involves not writing to a file but have failed to find something that works This is what I have:

Code:

du -m $i > filesize.txt
FILESIZE=$`cat "filesize.txt" | cut -f1
rm filesize.txt

I then use the FILESIZE to compare to a number.

View 3 Replies View Related

Server :: Default Size Of A Newly Created Folder?

Dec 4, 2010

I just want to know how the default size of a newly created file or folder is 4.0 kb.Does this value is mentioned in any configuration file,if that is the case can we edit that file and can we change this default value.

View 7 Replies View Related

Programming :: Editing Font Size In Evolution Xml File?

Mar 29, 2010

I am trying to increase the font size in the evolution xml file to make the sub-menu easier to read (the menu with new, send/receive, reply, reply to all, forward) I found where the xml file is located but i can not seem to adjust the font. is there a different syntax for xml for changing font than html/css?

View 2 Replies View Related

Programming :: Shell Script / How To Check File Size?

Jan 21, 2009

I have a file that's supposed to be growing in size 24/7. I want to check every 10 minutes via cron that it's actually growing. If not, send an email. Does anyone know how to write a script to do that?

View 3 Replies View Related

Programming :: Soft Limit For Core File Size?

Jun 22, 2011

Using getrlimit I am setting the core file size to be RLIM_INFINITY. But still the core file is not being generated,although in /var/log/messages it says a core is being generated

View 3 Replies View Related

Programming :: File Size Not Properly Checked In A Tcsh Script.

May 7, 2011

The check on the size of a file I perform in a tcsh script does not work. The size of my file is the following :

ls -l File.gpg
-rw-r--r-- 1 xuo users 3354637392 2011-05-07 15:31 File.gpg

The script is the following :

#!/bin/tcsh -f
set listOfEncryptFiles = `ls *.gpg`
foreach file ($listOfEncryptFiles)
set fileSize = `stat -c %s $file`
echo $fileSize

[Code]....

View 6 Replies View Related

Ubuntu :: Split Big File Size Into Small File Size

Jun 10, 2010

Are there software that can split big file size into small file size in Linux?

View 1 Replies View Related

Programming :: C With Gcc: Are All Variables Defined Like Pointers

Sep 13, 2010

i'm practicing in very basic c programs using the gcc compiler.I found that when i create two variables let's say

Code:

int a,b and Code: a=15;
b=3;
a=b;
b--;

then a equals 2.I thought that this isn't normal in C isn't it?I haven't had the time to read the gcc documentation yet...so i think it has something to do with my compiler's default settings.I use the

Code: gcc filename.c -o filename command to compile

Are all variables defined like pointers?

View 5 Replies View Related

Programming :: C++: Macro Not Defined In Quotes?

Dec 12, 2009

I converted my programming project over to autotools, which gives me a config.h file with all the cool definitions, like these ones:

Code:

/* Location of data files. */
#define DATADIR "/usr/local/share"
/* Define to the full name of this package. */
#define PACKAGE_NAME "lusus"

And naturally I think this is cool because then I can hardcore these into the binary. To my dismay, however, I discovered that the pre-processor does not do the text-substitution if the macro name is inside another quoted string.

Code:

// Prints out "/usr/local/share/lusus"
std::cout << DATADIR << "/" << PACKAGE_NAME << "
";

[code]....

This seems lame, because then this doesn't work:

Code:

CL_Image leaves_corner_tl(gc, "DATADIR/PACKAGE_NAME/img/leaves_corner_tl.png");

So, am I literally going to have to strcat DATADIR/PACKAGE with the other text every time I want to prefix DATADIR/PACKAGE_NAME onto another string?

View 2 Replies View Related

Programming :: NameError: Global Name 'set' Is Not Defined

Apr 17, 2011

I have a Red Hat 4.9 server running python 2.3.4. However I need some of the new functions so I downloaded and installed Python 2.7.1. I wanted to use the "set" function which was not in the earlier version.

/bin/python is 2.3.4
/usr/local/bin/python is 2.7.1

I have a script running 2.3.4 which calls the 2.7.1 script however it fails because it cannot find the "set" command here is an example

Script1
#!/bin/python
import Mytest

[code]....

The error message is :

NameError: global name 'set' is not defined

View 14 Replies View Related

Programming :: How To Test Whether A Macro Is Defined

Mar 20, 2011

I've been reviewing some source code recently which contains many conditional compilation statements, and I found it hard to understand the code not knowing whether some macro is defined or not. Is there any way to test whether a macro is defined?

View 2 Replies View Related

Programming :: Python - Global Name Not Defined

Jun 17, 2011

I found an interesting screencast online about how to make gtk Pyton apps. The thing is, though, the guy was using the interactive shell. I've been trying to get his code into a script, and have been having troubles.

Here's what I got:

Code:

It spits out the error "NameError: global name 'browser' is not defined"

I know I'm doing something wrong with how I'm telling it where to find "browser" and "text", but I can't figure out how to point it to the right place.

View 5 Replies View Related

Programming :: Use Environment Variables That Are Defined Outside Of The Script?

Feb 8, 2011

I am writing an expect script and I wish to use environment variables that are defined outside of the script.

View 6 Replies View Related

Programming :: Run A User-defined Command Without Sudo ?

Jan 24, 2011

I wrote a shell script and was able to compile it using SHC. after that i copied it to the /bin folder and tried running it as a normal user, but i keep getting the error " operation not permitted killed "

I tried changing the permissions. but it doesn't work. it only works with sudo. there must be another way. otherwise it won't be linux right?

View 11 Replies View Related

Fedora :: Re-size Logical Volume And Then Re-size File System?

Jan 19, 2011

is lvresize with --resizefs options re-size the Logical Volume and then re-size the file system? i mean we don't need to use resize2fs?I looked at man pages but it doesn't explain this option.

View 3 Replies View Related

Red Hat / Fedora :: Inode Table Size And File System Size

Dec 14, 2010

How can we find the maximum size of the inode table and what decides it, and how the maximum size of volume of file system is decided ?

View 4 Replies View Related

Programming :: Error: New Types May Not Be Defined In A Return Type?

Oct 12, 2010

The first line of this struct:

Code:
struct custom_int {
typedef int big_int;

[code]...

View 4 Replies View Related

Ubuntu :: Root File Not Defined

Oct 14, 2010

I've recently installed Ubuntu 10.04 64bit Desktop onto my 640GB hard drive. I used Wubi to download and install it onto a 100GB drive partitioned out from my 640GB hard. After I reboot and log into Ubuntu, it says that Roof File is Not Defined. The only thing I can do is to force my computer to shut down as so i did. After that I went to the demo mode of Ubuntu 10.04 as I can't do anything on the Normal Mode.

View 1 Replies View Related

General :: How Is The File Permission Is Defined

Jan 18, 2010

how is the file permission is defined?

for example when i use the command list -l testp01.txt i get the result of testp01.txt file permission -rw- r-- r-- root root etc however i wonder where are those information written?

is there any special file which contains all of these information?

View 7 Replies View Related







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