News for hackers. Stuff that matters.
Re:What's the one Linux command you wish you knew years ago? by wackfordjf3 on Sunday November 20, 2011 @09:18PM (#3259682)
In bash: cp /dir/dir/dir/dir/filename !#:^:h/newfilename (Applies to more than cp) Strips cp & repeats previous dir tree minus /filename, plus /newfilename.

This can be mimicked by brace expansion: cp /dir/dir/dir/dir/{filename,newfilename}

There are no comments on this comment yet.