I often need to make a small change to a file nested several directories below my current working directory. Since it's only one file, and globbing/scripting would be overkill, I make the change manually.
For example, I need to rename the file blaz.txt in ./foo/bar/blee to foobar.txt:
.
|--foo
|--bar
| blee
|-- blaz.txt
Normally, I do this by cd'ing to blee and running mv blaz.txt foobar.txt for single files. I know I could type out the full paths (resting on some handy tab completions to speed things up), but I would prefer something quicker.
Is there a better way to do this?
renameis not included in some of the *nix flavors I use. – Nick Tomlin May 29 '13 at 21:43renameyour distro ships - Debian and derivatives useperl-renameas theirrename(and that has an entirely different, perl-regex-based, syntax). – evilsoup May 29 '13 at 21:44