Questions tagged [stat]

26 questions
86
votes
6 answers

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: -. So how can I find the creation time of a file?
nux
  • 37,371
  • 34
  • 117
  • 131
32
votes
1 answer

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: 2015-03-24 12:34:56.12345678 What is the deal?
AlexC
  • 423
  • 1
  • 4
  • 5
15
votes
2 answers

When is Birth Date for a file actually used?

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 Device: 823h/2083d Inode: 656086 Links:…
WinEunuuchs2Unix
  • 99,709
  • 34
  • 237
  • 401
12
votes
1 answer

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 few issues. I suspect someone hacked into our SSH…
D3_JMultiply
  • 311
  • 1
  • 2
  • 8
3
votes
1 answer

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 directory the default numbers of links=2?
Sinoosh
  • 2,001
  • 2
  • 19
  • 32
3
votes
1 answer

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 creation date, or alternatively according to the…
Mohammad Reza Rezwani
  • 10,076
  • 35
  • 91
  • 127
2
votes
1 answer

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 for my unicorn server # Change parameters below to…
Dave
  • 2,014
  • 7
  • 20
  • 32
2
votes
1 answer

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 Nautilus, does it call stat syscall and file command…
ArekBulski
  • 1,181
  • 2
  • 12
  • 31
2
votes
1 answer

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 %%nice 0.00 ncm 3 2015-05-11…
SuB
  • 4,119
  • 5
  • 24
  • 33
2
votes
1 answer

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 could have done: find /path/to/files* -mtime +30 -exec…
dragosrsupercool
  • 271
  • 1
  • 4
  • 11
2
votes
1 answer

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 18 0.0 0.0 0 0 ? I< 16:15 0:00…
john hanna
  • 21
  • 2
1
vote
0 answers

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, it works, but if I try to access file directly…
rjasmin
  • 11
  • 2
1
vote
1 answer

How to copy date created to date modified ubuntu 22.04

I am using ubuntu 22.04 LTS and I want to know if the date created on ubuntu can be copied to date modified? I think I've read that the date created on ubuntu isn't actually the date created even though the label 'date created' is in Nautilus,…
1
vote
1 answer

why doesnt this bash script get all the files?

I have a large folder with subfolders of pdf files. I want to get all the pdf files (290 of them) and get them into one directory. (I thought that would be simple.) so that I can concatenate them into one document with my pdf program pdfshuffle, or…
j0h
  • 14,548
  • 28
  • 104
  • 178
1
vote
1 answer

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 looks something like this: .: 1569247414 ./a_file.txt:…
Mick
  • 113
  • 2
1
2