Inspiration
Wanted to go deeper into the commands list for navigating the file system in Linux.
What we learned
ls - list the contents of the current working directory.
cd - change directory
cd .. - go back to the parent directory.
cd ../.. - going to the parent of the current parent directory.
mkdir - create a directory(folder)
touch - creates a file.
pwd - prints the current working directory.
cat - displays the content of the file.
cat >> name_of_file - to add content to the file. To stop use Ctrl+C or Ctrl+D
cat file_that_remains_unchanged file_we_want_to_add_it_to - copying the content of one file
into the other file.
mv file_name new_location - moves the file to the new location.
cp file_name new_file_name - copies and creates new file from original file.
rm - removes the file specified.
rm -i (interactive) - asks if you want to remove the file or not.
rm -d - delete empty directory
rm -r - deletes everything inside the directory and the directory itself.
rmdir - removes empty directories.
rm *.txt - anything that has a .txt can be deleted.
rm star.* - all types of files named star will be deleted.
rm *.* - deletes all the files but not the directories.
find . -name - searches for the files with the same name specified in the current directory.
find . - name "*.txt" - displays all the text files.
find . -iname - find all the files and ignores case.
find . -type d -name - find the directory specified.
What's next for Linux Managing the File System
Will learn more about Linux.
Log in or sign up for Devpost to join the conversation.