In this assignment you will create a plain text file called hw1
(that’s h-w-one, not h-w-ell).
Note that the name is small letters, also known as lower case.
                
––––––––––––––––                 
Create a single file, hw1
, as your homework.
You will use redirection (>
and >>
), as discussed in lecture, to create and append to the file.
                
Do the appropriate command for each of these items in the order shown, and add the output of each command to the homework file hw1
.
You should have 5 lines in your file when done with these items.
                
/
).
hw1_file
in the pub/hw1Files
directory
in cs155
’s home directory (2 lines)
hw1_prog
in the pub/hw1Files
directory
in cs155
’s home directory (2 lines)
Add the command you would type for each of these items to the homework file hw1
in the order shown, not the output of the command.
In some cases you will also need to execute the command to complete the remainder of these items.
You should have 13 lines in your file after your complete these items.
The answers for these items must each be a single Unix command.
Semicolons (;) and pipes (|) are not allowed.
                
Rey
(not rey
),
while your CWD (Current Working Directory) is your home directory.
names
in the current directory,
which contains a list of all the filenames (of any type) in the bin
directory of the cs155
home directory.echo
command that echoes what you saw.
Your command must work, no matter what the contents of the bin
directory might be.
names
) to a file
named my-names
in your home directory without changing your CWD.
Rey
directory, that you created,
including any and all files inside the directory,
while your CWD is your home directory.
pub/hw1Files
directory in cs155
’s home directory to your home directory
with a single command.
Your final file should have exactly and only 13 lines.                 
––––––––––––––––                 
man ls
*
and ~
will get expanded.
% echo "cat *.html" cat *.html
echo
to append to your file, make sure to use "quotes".
Consider the following; If I see answers like the file bad
, then I
think that you don’t know how to use ~
.
% echo cd ~ >bad % echo "cd ~" >good % cat bad cd /s/bach/a/class/cs155 % cat good cd ~
hw1
in case so you don't have to start over or in case you accidentally delete it.
cp hw1 hw1.save1 cp hw1 hw1.save2 cp hw1 hw1.save3
––––––––––––––––                 
Use this command to submit your file. This works when you are are in the CSB 120 Linux Lab or working remotely with a machine in the lab from your Windows or Mac system.                 
~cs155/bin/checkin HW1 hw1
User: Guest