Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Class notes

unix commands

Rating
-
Sold
-
Pages
6
Uploaded on
21-01-2022
Written in
2021/2022

contains unix commands

Institution
Course

Content preview

UNIX Commands
This page lists some of the more commonly used UNIX commands.

About UNIX
• Commands are typed at a prompt. Most often, the prompt is a percent sign (%) or dollar sign ($) but sometimes it is the
name of the machine followed by the percent or dollar sign.
• Commands are case sensitive and are usually lower case. This means that ls and LS are completely different commands.
• Spaces are very important. There is always a space between the command and the file or directory it acts upon.
• To execute a UNIX command, press Enter at the end of the command line. If the command is accepted, the prompt and
cursor will simply appear on the next line awaiting your next command. If the command is rejected, an error message
such as "Command not found" appears. Check your spelling, spaces, etc and try to reenter the command. To negate a
command before you have pressed Enter, press CTRL + C.
• To determine your default shell, type echo $SHELL.
• To change your default shell, run /usr/local/bin/chsh and follow the prompt. Do NOT use flags on the command. This is
a custom script and not the standard chsh you might find on Linux machines. After running the command, allow 24
hours for the default shell to take effect.
• Dot files begin with a dot (.) and are used primarily to control system functions. Unless you are an advanced UNIX user,
you should not add or delete anything from a dot file.

Common UNIX Commands
Command Action

cat <file> Print contents of file in the command window

cd <directory> Change directories

cp <file> <file2> Copy the contents of file into file2

history List history of all commands issued at system prompt

ls List the files and subdirectories in a directory

ls -F List the difference between files and directories--directories have a slash (/)

ls -l List files with status/detail information

ls -lt List file information in long format, sorted by time with newest files or newly changed files
appearing first

ls -a List all the files in a directory including dot files

fs lq Lists AFS quota, space used, percentage used

fs q Lists percentage of quota used

mkdir Make a directory
<directory>

mv <file> <file2> Move file to file 2

pwd Print the pathname of the current directory

, rm <file> Remove or delete files

rmdir <directory> Remove directory

Ctrl + C To negate a command that you have entered.


Command Examples

Connected book

Written for

Institution
Course

Document information

Uploaded on
January 21, 2022
Number of pages
6
Written in
2021/2022
Type
Class notes
Professor(s)
Ram
Contains
All classes

Subjects

$3.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
chiranjeevijami

Also available in package deal

Get to know the seller

Seller avatar
chiranjeevijami sivani
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
4 year
Number of followers
1
Documents
20
Last sold
4 year ago

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions