Skip to main content
12 votes
Accepted

find -printf for file creation time is not working as expected, is it a bug?

This is a known bug: Linux exposes the creation time via the new statx system call whereas GNU find uses the traditional stat/lstat. Other GNU utilities have made the switch but not find.
muru's user avatar
  • 73.9k
8 votes

Find actual file by only file name, not literally everything non-related

Don't use -L, as the documentation (see man find) writes, if the -L option or the -follow option is in use, a diagnostic message is issued when find encounters a loop of symbolic links. So ...
Chris Davies's user avatar
5 votes
Accepted

find with du -sch and very many files

Your quoting makes no sense, the output of find doesn't get interpreted by a shell; neither does using \n as separator; you should instead always use \0 zero byte as separator and use xargs with -0; ...
Marcus Müller's user avatar
2 votes

removing hidden control characters in filenames

With zsh: autoload -Uz zmv zmv -n '(**/)(*[^[:print:]]*)(#qD)' '$1${2//[^[:print:]]}' Technically, we could just do: zmv -n '(**/)(*)(#qD)' '$1${2//[^[:print:]]}' But having the glob be more ...
Stéphane Chazelas's user avatar
1 vote
Accepted

Script to find multiple files and update their timestamps by a second

There are few points to consider: You do not need function for start, you need variable. Do not forget you later do math with this. So your lines: start() { date -d "${start_date}" +%s } ...
Romeo Ninov's user avatar
  • 17.9k
1 vote

find all zip files and hash the contents of the zip

If md5sum clobbers every previous value, you have to stat each file individually.It will require a small shell script. #!/bin/bash # yad gui selects a directory input=$(yad --title "Select ...
JayCravens's user avatar
1 vote
Accepted

Output to multiple files when redirecting output during each find -execdir loop

Redirections is done by the shell prior to running the command (here find). You'd need find to spawn a shell to perform a redirection for each file, or use mediainfo's --LogFile to let it write it ...
Stéphane Chazelas's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible