Today I Learned - Rocky Kev

TIL using the find command

POSTED ON:

TAGS:

I can always improve my bash skills.

Finding files

## syntax
$ find [path] -user [username] [options]


## example
$ find ./my-documents/ -user Rocky

Advanced searching


## directories or files

$ find ./my-documents/ -type d -user Rocky ## directories
$ find ./my-documents/ -type f -user Rocky ## files

## Permissions

$ find ./my-documents/ -perm 755 ## All files/directories inside subdirectory with permission 755

## Using Not
$ find ./my-documents/ -not -user Rocky ## All files/directories inside subdirectory not owned by Rocky

## Finding based on file extension
$ find . -type f -not -name "*.html" ## All files not ending .html extension

## Based on group
$ find . -group Developers ## files that are owned by the "Developers" group

## Based on changed within X time
$ find . -amin -30

via How to Search Files Effectively in the Linux Terminal – Advanced Guide


Related TILs

Tagged:

TIL using the find command

find [path] -user [username] [options]

TIL Find Command

I wanted to look for files with a specific extension. You can do that with ls *.(mp3|exe|mp4)

TIL playing Tetris inside Zsh

If you're using a Mac, you're probably using iTerm. 1. Load iTerm 2. launch emacs. 3. Launch Tetris.