Now suppose that you'd like to create an empty file called ';bar'; in
your new ';foo'; directory. You're still connected to your home
directory. How can you do this without changing directories?What is the answer to this question in Unix?
touch foo/barWhat is the answer to this question in Unix?
cd;mkdir foo; touch foo/bar
The ';cd'; sends you to your home directory
mkdir foo; creates the foo directory
touch foo/bar makes the empty file bar in the directory foo.
Alternatively, if you DON'T want to change back to your $HOME,
mkdir $HOME/foo; touch $HOME/foo/bar;
Subscribe to:
Post Comments
(Atom)
No comments:
Post a Comment