LPTHW shell commands

0.0(0)
studied byStudied by 0 people
GameKnowt Play
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

30 Terms

1
New cards

ls

List directory contents

2
New cards

cd

Change the current directory

use “cd ..” to move up one directory in the path, “cd ../.. “ to move up two, etc.

3
New cards

mkdir

Create a new directory

4
New cards

rm

Remove files or directories

rm -rf means recursive remove and forcefully deletes them without prompts.

5
New cards

pwd

Print the current working directory

6
New cards

hostname

Display the name of the current host system.

7
New cards

rmdir

Remove empty directories.

won’t work if the directory isn’t empty; use rm -rf to delete the directory and its files

8
New cards

pushd

push directory

9
New cards

popd

pop directory

10
New cards

cp

copy a file or directory

syntax is cp filetocopy.txt newfile.txt, or folder/, etc.

11
New cards

mv

move a file or directory

12
New cards

less

page through a file (use q for quit)

13
New cards

cat

print the whole file

14
New cards

xargs

execute arguments

15
New cards

find

find files

16
New cards

man

read manual

17
New cards

apropos

find which manual page is appropriate

18
New cards

grep

search for specific patterns within files.

19
New cards

env

look at your environment

20
New cards

echo

print some arguments

21
New cards

export

export/set a new environment variable or update an existing one.

22
New cards

exit

exit the shell

23
New cards

sudo

super user

24
New cards

-p

priviledged

use -p to add multiple new directories such a new1/new1a/new1a1

25
New cards

-lR

when used with “ls -lR” shows all the directories, permissions, history, etc.

26
New cards

touch

create a new empty file

27
New cards

-r

used to copy files recursively

for example, “cp -r sourcedirectory destinationdirectory”to copy directories and their contents.

28
New cards

xargs

extended arguments: tool for building and executing command lines from standard input.

29
New cards

chmod

change file permissions

30
New cards

chown

change file ownership