Search Results

Search: Posts Made By: tantric
5,743
Posted By tantric
Thanks for the replies ! Not...
Thanks for the replies !



Not necessarily. They just have to read the files into a buffer.
11,740
Posted By tantric
Thanks Jim. Hey what will be the right...
Thanks Jim.

Hey what will be the right command, if I do /not/ want to count any hidden files or any files in hidden directories.

Thanks !
11,740
Posted By tantric
Number of files in a directory
I have a directory which has lots of directories and files in it. I want to determine the total number of files in the top level directory (inclduing the files in sub-dirs)

Is there a unix command...
Forum: Programming 06-28-2007
3,975
Posted By tantric
Size of Directory
I have a C program to find out the total size of all the files in a directory.

So what it does is.. it scans through all the files in the directory and does a stat() on each of them and sums up...
Forum: Programming 06-26-2007
7,955
Posted By tantric
warning: integer overflow in expression
I have the following expression:

#define GB (1024 * 1024 * 1024)
#define TB (1024 * GB)
#define MAX_SIZE (3 * TB)

off_t ...
Forum: Programming 04-26-2007
19,784
Posted By tantric
Thanks for your reply guys ! Yes if...
Thanks for your reply guys !

Yes if st_blocks is not as large as st_size that means the file is sparse. And I can even calculate the number of holes it has. But my problem was to know exactly...
Forum: Programming 04-25-2007
19,784
Posted By tantric
locate holes in a sparse file.
Lets say my program reads one block (4096 bytes) at a time from a file. It needs to report whether that block is a hole.

The program currently uses read() to read 1 block into a 4KB buffer.
...
3,563
Posted By tantric
Hi, does anyone know how can I skip a loop 'n'...
Hi, does anyone know how can I skip a loop 'n' number of times in gdb.

For e.g:

for (i= 0; i< 100; i++) {
...
}

Lets say I am single stepping the program and I reach this loop. Now I want...
16,418
Posted By tantric
Can anyone think of a scenario in which size...
Can anyone think of a scenario in which size reported by ls -l is less than the size reported by du.

The other way round is possible, if the file has holes, ls -l will report a size more than du...
Forum: Programming 04-18-2007
38,033
Posted By tantric
since a and b are int b/a will return 0. So,...
since a and b are int b/a will return 0.
So, b/a * 100 will return 0. But since f is float, f will be 0.0

I think this works:

f = ((float)b * 100)/a
Forum: Programming 04-12-2007
4,812
Posted By tantric
Hi reborg, hmm not sure what you mean by...
Hi reborg, hmm not sure what you mean by clobber..

So, I execute make once. The object files are built from the source files. The executable is then built from these object files.

Now if I run...
Forum: Programming 04-12-2007
4,812
Posted By tantric
Makefile help
Hi,

What I want to do is for make to reconstruct the target even if its dependencies have not changed. So, even if if the dependent files do not have a more recent timestamp, the commands are...
Forum: Programming 04-08-2007
13,127
Posted By tantric
hmm.. thanks for your time Perderabo, I...
hmm..

thanks for your time Perderabo, I will see what I can do.. try and contact the system admin..

really appreciate your help !!!!
Forum: Programming 04-08-2007
13,127
Posted By tantric
Also, in my home dir I did a nfs mount of a file...
Also, in my home dir I did a nfs mount of a file from a storage system. I did not specify any noatime option but yet the atime is not changing for thie file on doing a cat.
Forum: Programming 04-08-2007
13,127
Posted By tantric
Hey Perderabo, I am not mounting anything.. I...
Hey Perderabo, I am not mounting anything.. I just created a file on my home directory.

(do u mean that my home directory was mounted with no atime updates ?? I never made use of any nfs mount...
Forum: Programming 04-08-2007
13,127
Posted By tantric
Guys, why is the atime not changing ? I use cat...
Guys, why is the atime not changing ? I use cat to read the file.. why the hell does the atime not change :( is there some setting that I need to change ? Also, if I use read in my program, the...
7,099
Posted By tantric
Thanks Perdarebo and sysgate !!! :)
Thanks Perdarebo and sysgate !!! :)
7,099
Posted By tantric
Hi, I had a question which is somewhat related to...
Hi, I had a question which is somewhat related to /tmp so I thought I would put it here, instead of starting a new topic :)

does anyone know whether the uniq command make use of the /tmp directory...
1,516
Posted By tantric
Thanks Johnf !! that worked.. !! :)
Thanks Johnf !! that worked.. !! :)
1,516
Posted By tantric
well, first the cursor is just after the '5' ...
well, first the cursor is just after the '5'
second its just after the 'f'

third, the cursor is *on* the '5'
1,516
Posted By tantric
oops, the cursor position did not come out...
oops, the cursor position did not come out properly..let me try again..

% ./a.out -g file.txt -n 15
^

Then I correct the typo..

% ./a.out -f file.txt -n 15...
1,516
Posted By tantric
Cannot do this simple thing
I think its a bash thing and it is really annoying me..

its difficult to explain the problem but I will try..

When I type a command on the shell prompt... then lets say I go back to the 2nd...
Forum: Programming 04-04-2007
13,127
Posted By tantric
read() without changing atime ?
Hey,

First of all I want to know How do I see the atime of a file ?? Whats the command ??

I think ls -l shows the last modified time right ? Because when I use cat to read a file, the...
Showing results 1 to 23 of 23

 
All times are GMT -4. The time now is 10:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy