stat Questions

2

Solved

I am trying to detect when Dropbox is busy updating a file in a user's Dropbox in Mac OS X. By running stat(1) or stat(2) on a file, I see that the user defined flags for file (st_flags) are normal...
Flugelhorn asked 11/5, 2013 at 15:0

1

Solved

is there any way to identify whether an object is file or directory using st_mode value? I'm using paramiko lstat() to retrieve the st_mode information from sftp files.
Vange asked 7/4, 2013 at 11:44

2

Under Linux, I have two file paths A and B: const char* A = ...; const char* B = ...; I now want to determine, should I open(2) them both... int fda = open(A, ...); int fdb = open(B, ...); .....
Volcanic asked 27/3, 2013 at 1:31

2

Solved

I have been trying to understand what exactly is happening in the below mentioned code. But i am not able to understand it. $mode = (stat($filename))[2]; printf "Permissions are %04o\n", $mode &a...
Begum asked 24/2, 2013 at 19:26

3

Solved

i'm using filemtime for fingerprinting external resources in html, like: <link rel="stylesheet" href="screen-<?=md5(filemtime('screen.css'));?>.css"> I noticed a significant delay be...
Cellophane asked 28/11, 2012 at 15:34

2

Solved

I would like to show how many changes (insertions+deletions) I made on a feature branch. Is there a way to get a summary of the git log --stat output for the changes between 2 commits (branch root ...
Serpens asked 1/11, 2012 at 17:3

3

Solved

In my C/C++ program I would like to check whether the data directory specified by user resides on NFS file system. The check is needed because the data processing latency / bandwidth is worse for t...
Foozle asked 28/7, 2012 at 8:22

1

Solved

I use stat two times in my script once to find the file files permissions and once to find the size of the file. `stat -c %A "$directory/$file"` `stat -c %s "$directory/$file"` I am using OSX ...
Ibsen asked 19/5, 2012 at 15:33

3

Solved

This is in reference to the structure for information about a file inode: dev_t st_dev; /* ID of device containing file */ ino_t st_ino; /* inode number */ mode_t st_mode; /* protection */ nli...
Slime asked 26/4, 2012 at 0:55

1

Solved

I am having a very strange issue with stat.h At the top of my code, I have declarations: #include <sys\types.h> #include <sys\stat.h> And function prototype: int FileSize(string ...
Borgia asked 14/2, 2012 at 21:13

3

Solved

This may sound like a silly question but up until recently if you tried to unmount a volume that was in use the Finder reported that it was in use, but not by whom. This is simple Unix functionalit...
Bugloss asked 6/11, 2011 at 22:39

1

Solved

Some filesystems (e.g. ext4 and JFS) offer nanosecond resolution of atime/mtime fields. How can I read ns-resolution fields? The stat syscall returns time_t which is a second-resolution.
Grimonia asked 26/8, 2011 at 14:15

3

I'm trying to understand the flags for the st_mode field of the stat structure of that stat command, but I'm having such a hard time! I found this example here, but I really don't understand this c...
Quennie asked 30/6, 2011 at 2:10

1

Solved

One of the fields in struct stat is st_mtime. I assume that is seconds since jan 1, 1970. Is that GMT or local time?
Thedrick asked 7/6, 2011 at 22:0

1

Solved

How can I set a Unix file's ctime? (I'd much prefer an answer in terms of Python. If there's no way to do it with standard Python, then I suppose C is OK too.) (Note: I know that one can us...
Allegorist asked 21/5, 2011 at 23:6

3

I just trying to round in R number like: > round(1.327076e-09) I would like it to result in > 1.33e-09 but results in > 0 which function can use?
List asked 15/4, 2011 at 10:45

1

Solved

I've done a little shared library that tries to intercept open, open64, stat and stat64 sys calls. When I export LD_PRELOAD and run oracle's sqlplus, I can see the traces of the open and open64 cal...
Dyak asked 29/3, 2011 at 20:52

2

Solved

This is a C program I wrote to recursively navigate and output directories and regular files. It compiles and runs fine on my Linux machine. But on Solaris, the dit->d_type == 8 check and the ot...
Cavalla asked 14/2, 2011 at 6:28

1

Solved

I have the below code only a part of it is shown here and I am checking if a the type of file. struct stat *buf /* just to show the type buf is*/ switch (buf.st_mode & S_IFMT) { case S_IFBL...
Kozak asked 21/10, 2010 at 6:45

1

Solved

On Posix systems, the st_blksize member of the stat structure contains the optimal block size for IO for a given file. It looks like the Win32 implementations of stat (_stat & _stat64) do not s...
Subclavius asked 13/8, 2010 at 15:57

1

Solved

I'm having trouble using os.utime to correctly set the modification time on the mac (Mac OS X 10.6.2, running Python 2.6.1 from /usr/bin/python). It's not consistent with the touch utility, and it'...
Bartholomeo asked 19/3, 2010 at 18:28

6

I'm traversing an entire partition, stat()'ing each file and then checking the returned values for mtime, size and uid against hashed values. stat() however is far too slow in Perl and I'm wonderin...
Artful asked 7/1, 2010 at 21:1

1

I used to write this: Private Sub Example() Static CachedPeople As List(Of MyApp.Person) If CachedPeople Is Nothing Then CachedPeople = New List(Of MyApp.Person) End If ...rest of code... End Sub...
Extensometer asked 27/9, 2009 at 15:11

© 2022 - 2024 — McMap. All rights reserved.