Last active
February 6, 2024 13:41
-
-
Save ProBackup-nl/e61b3564ec9aea024a2326b25d1475a3 to your computer and use it in GitHub Desktop.
Locate alias function for Arch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nano ~/.bashrc # note: user=root without sudo | |
--- | |
function locate_f() | |
{ | |
sudo find / -regextype posix-extended -regex "/(afs|media|mnt|net|sfs|sys|tmp|proc|udev)" -prune -o -path "*$1*" -print 2>/dev/null | |
} | |
alias locate=locate_f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment