Questions tagged [stat]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-1
votes
2answers
182 views

Linux find command - find files based on inode and device?

I want to find the files with a given inode number. Using find with -inum is not entirely helpfull as its listing files with the inode number from every file system/device. How to confine this search ...
0
votes
0answers
33 views

stat command vs dumpe2fs output

As metioned here: https://linux.die.net/man/8/dumpe2fs , dumpe2fs prints out superblock and size of blocks and.. like below : root@swkb-dev2:/home/heydari.f# dumpe2fs -h /dev/sda1 dumpe2fs 1.44.1 (...
1
vote
1answer
102 views

what does a STAT of I mean for ps -aux? “I” does not appear on the man page

ps -aux | grep "I<" root 4 0.0 0.0 0 0 ? I< 16:15 0:00 [kworker/0:0H] root 6 0.0 0.0 0 0 ? I< 16:15 0:00 [mm_percpu_wq] root ...
-2
votes
1answer
43 views

How to print last modified time of a file using | in BASH?

I am a novice in BASH coding. Is there any way I can print last modified time of a file (say photos) to a text file named last-modified.txt I tried searching around a bit and could accomplish the ...
0
votes
0answers
28 views

Information of cifsiostat cannot be obtained

When I execute the cifsiostat command, the value does not rise with 0. Please let me know if anyone knows the cause. (OS) Ubuntu 18.04.4 LTS (kernel) 4.15.0-1013-azure
-1
votes
1answer
98 views

Explain the file permissions, obtained from stat system call, using st_mode

Code: #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char * argv[]) { struct stat st; if(...
1
vote
1answer
80 views

stat command format to append '/' to file name if directory, and remove “./” from front

With the following command I have been able to list all the directories relative to the current directory along with the epoch time last modified: find . -exec stat -c '%n: %Y' {} \; the output ...
0
votes
1answer
208 views

Bash, stat, get real filename access time

System Linux hosek 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux Issue Is possible get real access time of file? Seems there is a problem with stat ...
0
votes
0answers
2k views

ldconfig.real cannot stat an existing directory

I am trying do deploy a application. I created a *.deb package (using fpm) which installs libraries to $HOME/.local/lib/nca and binaries to $HOME/.local/bin. To make my libraries visible I also ...
1
vote
0answers
69 views

Files, “real” access time when copy from remote host

Question.. Is possible to dig "real" access time of file copied from remote server and using it by including from another script? What I need. I need to know which files on server are unused/...
0
votes
2answers
679 views

SED or something to delete everything after first space up to `|`

I have a little bash snippet I'm working on: $ stat --printf=%A\|%U\|%G\|%s\|%y\|%N'\n' /usr/src/linux-headers-4.4.0-124/zfs/cmd/zhack drwxr-xr-x|root|root|4096|2018-05-17 05:54:49.361904361 -0600|'/...
0
votes
0answers
271 views

New STATX: how do I find the creation time (birth time) of a file? [duplicate]

How to use the new statx function to get only one information: the creation time (birth time) of a file. I have tried in terminal command line without success.
0
votes
0answers
31 views

Send ubuntu stats on Databox

I would like to send stats about my Ubuntu machine on Databox (uptime, network traffic, free space...) This will allow my colleagues to see the status of the machine. Do you think that would be ...
11
votes
2answers
5k views

When is Birth Date for a file actually used? [duplicate]

When I type the following: $ IFS=$'\n'; arr=( $(stat "/bin/bash") ); for i in ${arr[@]} ; do echo $i ; done File: '/bin/bash' Size: 1037528 Blocks: 2032 IO Block: 4096 regular file ...
2
votes
1answer
963 views

Getting “unable to stat //bundle (No such file or directory)” even though the file exists

I'm hoping this is just a problem with my not understanding how the $PATH variable works. I'm using Ubuntu 14.04. I'm trying to run rails through a unicorn server. I have the below configuration ...
0
votes
0answers
55 views

Why “/proc/pid/stat” have 2 type?

When I run command: cat /proc/$pid/stat, it returns string like this: type 1: 11473 (abc) R 11471 8438 8438 0 -1 4194304 113 0 0 0 0 0 0 0 20 0 1 0 740394567 13586432 387 18446744073709551615 ...
2
votes
1answer
39 views

Nautilus calling stat/file on all directory entries

I am writing a paper and I need to confirm something that is pretty obvious to me but I haven't seen the code that would authoritatively tell me that this is how it works. When I open a folder in ...
3
votes
1answer
943 views

Default number of links for directory?

I know that hard link can not point to directories but when i create an empty directory and execute stat command for it links=2 ,I search for symbolic links There is not another link. why for ...
1
vote
0answers
60 views

I can copy a file using cp, but trying to use sendfax returns cannot stat file.

As the title says, using Raspberry pi, and Raspbian, I am trying to configure a faxing server that basically reads a file from a CIFS share and sends it using hylafax. If the file is stored locally, ...
0
votes
2answers
785 views

Cannot apply 'stat' command for given parameters

I want to make a small shell script that shows all the files in a file tree starting from a given directory that have the given user and size greater than a given size. Hence, my script will take as ...
2
votes
1answer
272 views

What does mean the second field of sadf`s output?

When you use sadf to make a report from sysstat's datafile, the following lines will be shown: ncm 3 2015-05-11 03:57:15 UTC all %%user 0.08 ncm 3 2015-05-11 03:57:15 UTC all ...
15
votes
1answer
8k views

What is the difference between Modify and Change in stat output

What is the difference between Modify and Change in stat output? When I run this command: stat myfile I am getting two lines with identical timestamps: Modify: 2015-03-24 12:34:56.12345678 Change: ...
2
votes
1answer
2k views

Can a directory's mtime be older than that of file inside?

I have this very silly and very basic question but I thought better to ask before I start pruning my NAS. I want to delete all directories in which all files are older than 30 days. For files I ...
12
votes
1answer
20k views

sudo: unable to stat /etc/sudoers: No such file or directory - File Exists

I am one of a few people managing a gaming server. The Server is currently running Ubuntu 14.04, which was installed just 3 weeks ago. Everything was running fine until a few days ago, we've had a ...
73
votes
5answers
89k views

How do I find the creation time of a file?

I need to find the creation time of a file, when I read some articles about this issue, all mentioned that there is no solution (like Site1, Site2). When I tried the stat command, it states Birth: -...
3
votes
1answer
3k views

Sort files in directory by creation date (Birth)

In my Downloads folder I have a lot of files. I need to arrange them according to the following criteria: they shall be arranged by type; files of the same type shall be listed one after the other by ...