
Useful Linux Commands
In this article I will show you the commands that I use the most on my Ubuntu vps. Navigation Command Action ls -alth show content of folder wc -l <path to file> display the number of lines in a file pushd <path> go to a directory and save the path in history popd rollback to previous directory from pushd dirs -v show pushd history cd - get back to previous directory (reset history) mkdir -p /folder/folder2 create a new directory with non existing folders find . -name "*.yaml" find all files that end by ".yaml" in current directory File editing Command Action pwd > test.txt send the content of a command to a file (erase the previous content) pwd >> test.txt add the content of a command to the next line of a file pwd | tee test.txt same as pwd > test.txt but print it in cli pwd | tee -a test.txt same as pwd >> test.txt but print it in cli grep "ubuntu" test.txt | wc -l connect commands (for instance to get number of line with a word) System Command Action ps aux list all processes for a
Continue reading on Dev.to
Opens in a new tab




