CuTt: Find file’s fullpath

Copper’s Tips & Tricks #1: Find file’s fullpath

Two ways to do this, the normal way, using `find`, and the hipster way, using `tree` and `grep`:

The normal way
find . -name '[filename].[extension]'

# E.g.:

$ find . -name 'wp-config.php'

./Documents/Sites/some-project/workspace/some-beep/wordpress/wp-config-sample.php
./Documents/Sites/some-project/workspace/some-beep/wordpress/wp-config.php
./Documents/Sites/some-project/workspace/some-boop/wordpress/wp-config-sample.php
./Documents/Sites/some-project/workspace/some-boop/wordpress/wp-config.php
./Documents/Sites/some-project/workspace/some-noise/wordpress/wp-config-sample.php
./Documents/Sites/some-project/workspace/some-noise/wordpress/wp-config.php
./Documents/Sites/some-project/workspace/some-censured/wordpress/wp-config-sample.php
./Documents/Sites/some-project/workspace/some-censured/wordpress/wp-config.php
The hipster way
$ tree -fi | grep SiteSettings
./wordpress/wp-content/themes/example/models/App_SiteSettings.php

Why use tree and grep when you have find??? Good question! Mostly because pipe grep is more instinctive than find, and easier to remember “tree fi grep” than “find dot SINGLEdash name”, I find myself using tldr all the time for find, non-pipe grep, and tar all the time.

This is arguably the least useful tip and trick, but, looking on the bright side, it’s also the MOST useful as of this writing, because it’s the first and only one! Protip: Call your gf “my prettiest gf” if you dislike lying

Don’t Stop Here

More To Explore

Mi Historia en GM2

Zarco inició en mayo de 2015 a través de una pasantía sin saber nada de lo que es el software development y ahora es uno

Read More »

CuTt8: git branch by date

Copper’s Tips & Tricks #8: git branch by date Here at the office we use feature branches. Feature branches with ticket name/numbers. Now, I am

Read More »

CuTt7: theme-symlink

Copper’s Tips & Tricks #7: theme-symlink WordPress developers, I know some of you who use Sublime or similar tools with file explorer sidebars, have problems.

Read More »