0% found this document useful (0 votes)
27 views1 page

Command 6

Uploaded by

zainab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views1 page

Command 6

Uploaded by

zainab
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

ls -> listing of current directory

ls -l -> detailed lists (user, permission, date, file name)

ls -l /home/spower/Documents (Case sensitive)

cat file1.txt (Opens file)


cat file1.txt file2.txt (both documents will be displayed, catinated)

echo Hello (display)


echo Hello There (skips multiple spaces)
assumes hello and there as two seperate things. Quote to keep it one
echo "Hello THERE"

VARIABLES:

a=Hello
echo $a

a=Hello There => ERROR


a="Hello There"
echo $a
b="Good buddy"
echo $a $b
echo "$a$b" //treats as one argument

GlobbingLimited search:

ls *.txt
ls file1.*
ls file?.txt
? = any single character
* = anything

echo $PATH //shows directories where commands are run; executable locations
which ls //locate ls command /bin/ls
which echo //both ls and echo is in /bin

Everything else "Command not found"

use ; for multiple inline commands


echo $a ; $b //different lines

history //recent typed commands

You might also like