09-28-2010
Help completing lab.
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Quote:
1. Start a command-line session with matrix.
2. Working from your
home directory create a directory named lab2b (use all lowercase letters)
3. Copy the Acceptable-Use-Policy file that resides in your home directory to your lab2b directory
4. Make lab2b your present working directory
5. Without changing working directories, list the contents of your home directory. Be sure that hidden files are also listed
6. Change directories to your home directory using the fewest possible keystrokes.
7. While in your home directory, create another directory called Labs (note that the "L" in "Labs" is uppercase).
8. Move your lab2b directory (including its contents) into Labs.
9. Use the tree command to verify the layout of your Labs directory. Your Lab directory structure should now look like this:
~
|
--------
|
Labs
|
-------
|
lab2b
|
-----
|
Acceptable-Use-Policy
Draw the above directory tree on a separate sheet of paper and keep updating it as you complete the following commands
Note: If the tree command output looks different, check your work for previous steps and redo them as needed.
10. Make lab2b your working directory
11. Working from lab2b, use the cat command to view the contents of the file called Acceptable-Use-Policy
12. Repeat the previous question using the more command. What did you notice that was different? Write down your observations.
13. Copy the /etc/group file to your present working directory (lab2b)
Note: under certain circumstances you may not be able to access the above file. In such case, use /home/uli101/group instead, noting the difference on your paper.
heres the lab i did everything but when i issue the automated lab check.
but it gives me this everytime
''you are missing the /home/smichaels/Labs/lab2b/group file, please create it as per step 12 of the lab.
once you have corrected this problem, re-run the uli101.023 program''
im dumbfounded cause i think im doing it correctly/
2. Relevant commands, code, scripts, algorithms:
3. The attempts at a solution (include all code and scripts):
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
seneca toronto canada , tanvir alam uli101
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
---------- Post updated at 06:33 PM ---------- Previous update was at 06:07 PM ----------
anyone ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hai all..
How do i terminate my telnet session automatically when my java applicatiion exits. i have a file run which executes my java application and takes care of all class and library path settings prior to the execution. I would like to terminate my session when my application exits. The... (4 Replies)
Discussion started by: deepsteptom
4 Replies
2. UNIX for Dummies Questions & Answers
Hello.
i am new to unix, though have quite a substantial background of other systems.
i recently installed ffmpeg and mencoder on a unix server, which holds a website, in order to use these programs from the website.
after installation, i can activate both commands directly using putty,
no... (1 Reply)
Discussion started by: noamon
1 Replies
3. Shell Programming and Scripting
heres the lab i did everything but when i issue the automated lab check.
but it gives me this everytime
''you are missing the /home/smichaels/Labs/lab2b/group file, please create it as per step 12 of the lab.
once you have corrected this problem, re-run the uli101.023 program''
im... (1 Reply)
Discussion started by: ink
1 Replies
4. Shell Programming and Scripting
Write a script that copies the file tree (including subdirectories) in your home directory. As the initial directory to take the directory / usr / share / doc, as the destination directory using the directory $ {HOME} / doc.
Write a script corresponding to paragraph 1. Additional conditions: a)... (1 Reply)
Discussion started by: elginmulizwa
1 Replies
5. Shell Programming and Scripting
Hi,
Iam using below code to login to servers to get cpu utilisation. but output is coming for only one server. code is below
root@blr-svr-oclan-01 # more SSSC_CPU_UTIL1.sh
#!/bin/sh
echo "CPU UTILIZATION"
while read line; do
IDLE=`/usr/local/bin/sshpass -p 'xxx' ssh xxx@$line 'sar 2 2' |... (1 Reply)
Discussion started by: surender reddy
1 Replies
6. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Here are my directions. I am pretty sure I am doing this right, but I just want someone more experienced to look... (4 Replies)
Discussion started by: Jagst3r21
4 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Filter a file for lines that have exactly 5 numbers in a row.
2. Relevant commands, code, scripts,... (13 Replies)
Discussion started by: herb bertz
13 Replies
8. Shell Programming and Scripting
Hello All,
I am automating a task using bash script and got stuck at this. From the below input,
Meta Device Members (20) :
{
----------------------------------------------------------------------
BCV DATA RDF DATA ... (7 Replies)
Discussion started by: Sam R
7 Replies
9. Shell Programming and Scripting
The lines in bold check the value of a user input, if it is not one of the expected genes (GJB2, MECP2, PHOX2B), the user is shown a list of formats to use and the variant is entered. It is then supposed to printf that entered variant? Thank you :).
name() {
printf "\n\n"
printf... (2 Replies)
Discussion started by: cmccabe
2 Replies
10. Shell Programming and Scripting
In the below bash the function execute is started with the while true at the end of the script. Currently, this works and processing does begin. The function panel in bold does not get called after execute completes, therefore the user does not get the menu selection and the files just loop... (3 Replies)
Discussion started by: cmccabe
3 Replies
cd(1) General Commands Manual cd(1)
NAME
cd - Changes the current working directory
SYNOPSIS
cd [directory]
Note
The C shell has a built-in version of the cd command. If you are using the C shell, and want to guarantee that you are using the command
described here, you must specify the full path /usr/bin/cd. See the csh(1) reference page for a description of the built-in command.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
cd: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
None
OPERANDS
The pathname (either full or relative) to be used as the new working directory.
If (hyphen) is specified as the directory, the cd command changes your current (working) directory to the directory name saved in
the environment variable OLDPWD.
DESCRIPTION
The cd command moves you from your present directory to another directory. You must have execute (search) permission in the specified
directory.
If you do not specify a directory, cd moves you to your login directory ($HOME in ksh and sh environments, or $home in csh environment).
If the specified directory name is a full pathname, it becomes the current working directory. A full pathname begins with a / (slash) for
the root directory, with a . (dot) for the current working directory, or with a .. (dot dot) for the parent directory. If the directory
name is not a full pathname, cd searches for it relative to one of the paths specified by the $CDPATH shell variable (or $cdpath csh vari-
able). This variable has the same syntax as, and similar semantics to, the $PATH shell variable (or $path csh variable).
EXIT STATUS
The following exit values are returned:
The directory was successfully changed. An error occurred.
EXAMPLES
To change to your home directory, enter: cd To change to a new directory, enter: cd /usr/include
This changes the current working directory to /usr/include. Now file pathnames that do not begin with / or ../ specify files located
in /usr/include. To go down one level of the directory tree, enter: cd sys
If the current working directory is /usr/include and if it contains a subdirectory named sys, then /usr/include/sys becomes the cur-
rent working directory. To go up one level of the directory tree, enter: cd ..
The special filename .. (dot dot) always refers to the directory immediately above the current working directory.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of cd: A colon-separated list of pathnames that refer to directories. If the
directory operand does not begin with a / (slash) character, and the first component is not (dot) or cd command will search for directory
relative to each directory named in the CDPATH variable, in the order listed. The new working directory will be set to the first matching
directory found. An empty string in place of a directory pathname represents the current directory. If CDPATH is not set, it will be
treated as if it were an empty string. The name of the home directory, used when no directory operand is specified. Provides a default
value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default
locale is used. If any of the internationalization variables contain an invalid setting, the utility behaves as if none of the variables
had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines
the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte char-
acters in arguments). Determines the locale for the format and contents of diagnostic messages written to standard error. Determines the
location of message catalogues for the processing of LC_MESSAGES. A pathname of the previous working directory, used by the cd - form of
the command. The cd command sets this variable to your current working directory before changing to a new current directory. A pathname
of the current working directory, set by the cd command after it has changed to that directory.
SEE ALSO
Commands: csh(1), ksh(1), pwd(1), Bourne shell sh(1b), POSIX shell sh(1p)
Functions: chdir(2)
Environment: environ(5)
Standards: standards(5)
cd(1)