Reputation: 21877
I've been using unix for some time, and I would like to know if there is a simple command for getting to the begginging of a command without holding the arrow.
Say I want to change /usr/ to /foo/
/usr/bin/apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
Upvotes: 1
Views: 42
Reputation: 140327
After you typed the first command you could use
$^/usr/^/foo/
To run the last command by replacing /usr/
with /foo/
$ echo "/foo/bar/"
/foo/bar/
$ ^/foo/^/baz/
echo "/baz/bar/"
/baz/bar/
Upvotes: 3