I am trying to find all directories that start with a year in brackets, such as this:
[1990] Nature Documentary
and then rename them removing brackets and inserting a dash in between.
1990 - Nature Documentary
The find
command below seems to find the results, however I could not prefix the pattern with ^
to mark start of directory name otherwise its not returning hits.
I am pretty sure I need to use -exec
or -execdir
, but I am not sure how to store the found pattern and manipulate it.
find . -type d -name '[[[:digit:]][[:digit:]][[:digit:]][[:digit:]]] *'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…