The stat tag has no wiki summary.
3
votes
1answer
48 views
stat on an encrypted volume in osx takes a long time
My workstation is a MacBook Pro with an SSD. For security reasons, my main volume is encrypted.
I ran this command on a folder:
time find . -exec stat {} + >/dev/null
real 0m5.205s
user ...
2
votes
1answer
108 views
rsync and backup and changing timezone
I back up my pictures from my camera using rsync, using:
rsync -vzrtl --progress --stats --timeout=0 host destination
Now I was in a different timezone when I did my first backup then I moved to a ...
3
votes
2answers
133 views
Why do . and .. have a file size of 4 kB and 12 kB, respectively? [duplicate]
As displayed by ls -al, for example:
drwxr-xr-x 9 jb jb 4.0K Mar 8 18:05 ./
drwx------ 49 jb jb 12K Mar 17 14:15 ../
I assume this is the minimum amount of space required to store the inode's ...
2
votes
1answer
66 views
Local, regular file causes `stat` or `ls -l` to hang
I've seen a few different questions about ls hanging. It's usually because they use the -l switch, which causes a stat on the file, which in turn is a bad symlink or pointing to an NFS mount or some ...
0
votes
2answers
381 views
Installing prstat package command on Ubuntu Linux
I'm trying to run the prstat command on my Ubuntu server, but it doesn't seem to be installed, I have searched the web for the package name needed to install it but without any luck for some reason..
...
2
votes
2answers
144 views
linux disk caching affects access times reported by stat?
On Ubuntu 12.04 I did the following
stat a file
cat the same file
stat the file again
cat the file again after 5 min
stat the file
The access time reported at 3. reflects the point at which 2. was ...
4
votes
3answers
410 views
Equivalent of date --reference in Solaris
The GNU implementation of the date command has a nice feature to show the date of the last modification of a reference file, and using the +FORMAT parameter it is easy to get the date in any format, ...
8
votes
1answer
956 views
Birth is empty on ext4
I was just reading up on the Birth section of stat and it appears ext4 should support it, but even a file I just created leaves it empty.
~ % touch test ...
3
votes
1answer
187 views
How to compare attributes of two files on Linux ext4
cmp(1) will of course tell me if the contents of two files are identical, but in order to test restoring from backups I also wanted to compare the relevant (!) file attributes.
So if I did something ...
7
votes
1answer
491 views
Does inotify fire a notification when a write is started or when it is completed?
Imagine two processes, a reader and a writer, communicating via a regular file on an ext3 fs. Reader has an inotify IN_MODIFY watch on the file. Writer writes 1000 bytes to the file, in a single ...
1
vote
1answer
210 views
What is “raw mode in hex” from stat output?
When using GNU stat to probe the filesystem, there are a number of format sequences available for the --format/--printf arguments; this one in particular
%f Raw mode in hex
doesn't make much ...
3
votes
3answers
1k views
using stat to provide timestamp for touch
Am trying to OCR some documents insitu (from a linux command line on a windows share). The process of OCRing is find and I have muddled through using the find command to pipe the files through the ...
3
votes
1answer
232 views
Is there a way to view a list of timestamp history of a document/file via terminal/command line?
This seems like it's simple but for some reason, it's not:
Problem:
I've been writing a paper- not even a script...just an economics paper- over the last 3 months. I'm trying to determine how much ...
3
votes
2answers
1k views
file block size - difference between stat and ls
I've noticed that when I do a:
ls -ls file
It provides block count, say 8 blocks.
When I do:
stat file
I notice that the block count is 16, twice the number given by ls.
The block size on my ...
2
votes
3answers
513 views
cp launched from code results in cannot stat '/tmp/somedir' works in shell
I'm working on making some scripts more elegant by implementing them in a real x application etc...
At some point in the scripts we basically want to take everything from a mounted removable storage ...
5
votes
2answers
2k views
Get CPU utilization stats from C program
I want to read the CPU utilization stats from a C program, I am interested in the percentage of use of CPU, steal time etc. These stats are shown in the 3rd row from the top command.
I tried to parse ...
3
votes
2answers
520 views
Access history of a file
I was wondering if there are any tools to keep track of the access history of a file. I know of stat, but as far as I understand, it only returns information about the last time the file was accessed.
...
2
votes
1answer
3k views
What does this process STAT indicates?
If you check the STAT column in above image you will see Ss S S< SN and R+
What does this indicates ? Process states.
If yes,Then what is the significance of 'Ss S< SN and R+'?
4
votes
1answer
317 views
Efficiency of lots of inotify watches or stat calls
I am developing software that will utilize inotify to track changes on a large amount of files (tens to hundreds of thousands of files). I have come up with these ideas:
one watch per file
one watch ...
6
votes
1answer
926 views
When was `relatime` made the default?
What is the first Linux kernel release to set relatime as the default mount option?
3
votes
2answers
381 views
What can you do to a file without triggering the “Change” Timestamp?
What can you do to a file without triggering the "Change" stat? For instance, it appears that simply changing a bit will trigger Change.
6
votes
2answers
472 views
Change file creation time on a FAT filesystem
I need a way to change the creation time of a file on a mounted FAT32 volume. I have to do that because my MP3 player will only read files sorted by this creation time.
If I can find a way to set the ...
2
votes
1answer
206 views
Has the GNU coreutils stat tool changed?
Has the GNU coreutils (8.6) version of stat changed? After a recent update, some scripts I wrote that call stat are not working as expected; in particular, I had been making use of stat -c %Y ...
2
votes
1answer
2k views
Error when using stat, errno=2
The case is as this, I create many files, and after the file generation, I use stat to get the all files info under the directory.
The purpose is to purge all the files which are old than the ...