Unix/Linux Flashcards
What is a command to change directory to directory name?
cd directory_name
What is a command to change permissions?
chmod [permissions] [file/directory]
What is a command to copy?
cp [options] source_file destination
cp -r directory_name destination/
What is a command to display information about file type?
file [filename]
What is a command to search files?
find search_path -name filename
grep “hello” *.txt
What is a command to create a new directory?
mkdir directory_name
What is a command to move a file to a different location?
mv file_name directory_name
What is a command to remove a file?
rm example.txt
What is a command to remove a directory?
rm -rf my_folder
What is vi?
Visual editor is a command-line editor that allows users to create, edit, and manipulate text files.
How to save changes in vi editor?
:w
:wq - save and quit
:q! - quit without saving