Tag Info

New answers tagged

2

At most the atime (access time) field of the directory will be updated, if the file's inode was not already in the cache. However the default with modern Linux kernels is to mount filesystem with the relatime flag, meaning that the atime is only updated if the file or directory is accessed after the modification time (mtime) and the current atime is earlier ...


2

The modification time of a directory, like any other file (note how directories are called directories (a list of name/number mappings like a phone directory) and not folders) is updated whenever the content is modified. That is when a file is added (linked), removed (unlinked), or renamed in it. Beware that files can be linked to several directories. The ...


3

You can easily get that information using stat. As for ancestral directories it is easily checked that if a file changes that this doesnt' affect anything "up the hierarchy" by looking at /: root@pooh:/home/anthon-mint# stat / File: ‘/’ Size: 4096 Blocks: 8 IO Block: 4096 directory Device: 804h/2052d Inode: 2 Links: 30 ...


3

I would use find <PARENT_DIR> -type f -mtime 1 With 1 the time of last modification in days (you can prefix it with - or + to indicate "less than X days" or "more than X days") : so, if you want the the file modified in the last 3 days, you'll do -mtime -3


1

First, note that compression has nothing to do with encryption. There are tools that do both, but the two parts of functionality are independent. Cryptography is about information processing. It can be described as mathematical transformations. Mathematics doesn't depend on the date. If I can decrypt something today, I could already decrypt it yesterday, ...


3

This is a computer science question. Can this be done at all? It it possible? The naive answer: Alice gives bob locked file and key, but first makes bob promises that he will not unlock it until it is time. Alice gives locked file to Bob, and key to Clare. Alice instructs Clare to give key to Bob at pre-defined time. For the case of writing special ...


0

Read the find manpage's description of -cnewer -cnewer file File's status was last changed more recently than file was modified. Emphasis mine. All of the files were modified before 22:00 and were changed after 22:00, so they were all changed after any one of them was modified. Thus they are all listed. So the result seems correct. Whether that ...


0

I ended up generating a .gitsha for the repo in the root folder, and only rewriting it if it is out of date. This gives me what i want.. at the expense of exploding one line of code to 20.. new_sha=$(git rev-parse HEAD) if [ -f ../.gitsha ] then old_sha=$(cat ../.gitsha) if [ $old_sha = $new_sha ] then generate=false echo "gitsha file up ...


2

In first close it can be: awk -F"[][ ]*" -v it=300 '{ sub(":"," ",$2) gsub("/"," ",$2) "date +%s -d \""$2"\""|getline d if (d-f>it) { f=d if (NR!=1) print s/n s=n="" } n++ s+=$NF }' log.file -F"[][ ]*" used as Fields Separator to strip square brackets additionally -v it=300 set ...



Top 50 recent answers are included