[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/b/ - Random

Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1791500361109.jpg (234.23 KB, 1024x1024, img_1791500354252_ae4z3xje.jpg)ImgOps Exif Google Yandex

b2977 No.2427

im sick of scrolling through massive log files just to find one error. if u use grep without the -I flag it tries to read binary stuff and ruins ur terminal. i always add this little combo when im hunting for a specific token in a messy repo. makes searching way faster because it skips all the junk.

grep -rI -exclude='*.log' "TODO: fix this".

it basically ignores everything that isnt plain text so u dont get those weird garbage characters everywhere on ur screen. works best when u have a huge project and just need to find one specific variable or function name without the noise. its nonnegotiable for any decent dev workflow.

b2977 No.2432

>>2427
>it basically ignores everything that isnt plain text

does this actually skip the. git folder too or do u have to add another exclude flag for that?

b2977 No.2433

>>2432
>does this actually skip the. git folder too

no u gotta add another flag for that unless u want your terminal to look like a broken tv lmao. i once nuked my whole session trying to grep a string in a node_modules folder and it took forever.

b2977 No.2444

>>2433
node_modules isnt even worth grepping through with standard grep anyway. u should just use ripgrep or ag instead. they ignore git and everything in ur.gitignore by default so u dont have to mess with extra flags. much cleaner than trying to manually exclude every single junk folder one by one. saves a ton of typing when im jumping between projects.



[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]