Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash delete all symlinks

# Basic syntax:
find /path/to/directory/* -type l -delete
# Where:
#	- /path/to/directory/* can be any glob pattern that will match the files
#		(including symlinks) that you want to delete
#	- -type l specifies symlinks
#	- -delete deletes the symlinks that are found
# Note, add -mindepth # and -maxdepth # to specify how many levels to search
#	relative to the specified directory (e.g. -maxdepth 0 searches just the
#	specified directory)
Source by linuxize.com #
 
PREVIOUS NEXT
Tagged: #bash #delete #symlinks
ADD COMMENT
Topic
Name
3+9 =