1/29
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
ls
List directory contents
cd
Change the current directory
use “cd ..” to move up one directory in the path, “cd ../.. “ to move up two, etc.
mkdir
Create a new directory
rm
Remove files or directories
rm -rf means recursive remove and forcefully deletes them without prompts.
pwd
Print the current working directory
hostname
Display the name of the current host system.
rmdir
Remove empty directories.
won’t work if the directory isn’t empty; use rm -rf to delete the directory and its files
pushd
push directory
popd
pop directory
cp
copy a file or directory
syntax is cp filetocopy.txt newfile.txt, or folder/, etc.
mv
move a file or directory
less
page through a file (use q for quit)
cat
print the whole file
xargs
execute arguments
find
find files
man
read manual
apropos
find which manual page is appropriate
grep
search for specific patterns within files.
env
look at your environment
echo
print some arguments
export
export/set a new environment variable or update an existing one.
exit
exit the shell
sudo
super user
-p
priviledged
use -p to add multiple new directories such a new1/new1a/new1a1
-lR
when used with “ls -lR” shows all the directories, permissions, history, etc.
touch
create a new empty file
-r
used to copy files recursively
for example, “cp -r sourcedirectory destinationdirectory”to copy directories and their contents.
xargs
extended arguments: tool for building and executing command lines from standard input.
chmod
change file permissions
chown
change file ownership