Hot answers tagged


for dir in ????-??-??--??:??:??/; do if [[ $dir > "2020-01-05--00:00:00" ]]; then printf '%s\n' "$dir" # process "$dir" here break fi done The above script will loop through the directories in the current directory whose names matches the pattern ????-??-??--??:??:??. For each directory, it is compared to the string ...


I came up with $ printf '%s\n' ????-??-??--??:??:?? | awk '$1 > "2020-01-05--00:00:00"{print;exit}' 2020-01-23--13:24:13


With zsh: ref=2020-01-05--00:00:00 list=($ref *(DN/oN)) # list is ref + all directories unsorted list=(${(o)list}) # sort the list (as per locale collation algorithm) print -r -- ${list[$list[(ie)$ref] + 1]-none} (where $array[(ie)string] expands to the array index of the element that is exactly string).


I was working on something similar the other night. My setup is a little different in that I do not use a home directory, each LVM is mounted at its own root level directory but a few things that may help: In the [Global] section, i enforce a minimum SMB level using: [Global] min protocol = SMB2 If you are running SMB 4 you could also set SMB3 as a ...

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