I am trying to write a shell script under linux that lists all folders (recursively) with a specific name and a no symlink pointing to it.
For example, I have:
/home/htdocs/cust1/typo3_src-4.2.11 /home/htdocs/cust2/typo3_src-4.2.12 /home/htdocs/cust3/typo3_src-4.2.12
Now I want to go through all the subdirectories / home / htdocs and find those typo3_ * folders that are not pointed somewhere.
It should be possible with shellscript or a command, but I have no idea how to do this.
thanks for the help
Stephen
, , node, , , . , . /home/htdocs, , :
/home/htdocs
# find specified folders: find /home/htdocs -name 'typo3_*' -type d | while read folder; do # list all symlinks pointing to $folder find -L /home/htdocs -samefile "$folder"|grep -v "$folder\$" done
Source: https://habr.com/ru/post/1739686/More articles:Override methods in the Objective-C class - overloadingBlackberry app not deploying in eclipse simulator - eclipse-pluginWriting Russian in XML - javaMySQL - selecting top records - sortingMolded windows in gtkmm - c ++Deserialize shared collections - go empty - c #Serving a request for a servlet - javaWhy should I use VARCHAR over TEXT in MySQL? - mysqlChanging models in django leads to a broken database? - pythonUsing msmq and wcf - c #All Articles