Here are some frequently used linux commands.
ls List files in the current directory
$ ls
option Include detailed information
$ ls -l
Include hidden files
$ ls -a
cd Move from the current directory to the specified directory
$ cd test
mkdir Create a directory with the specified name
$ mkdir test
touch Create a file with the specified name
$ touch test.txt
cp Duplicate the specified file with the specified name
$ cp test.txt test_copy.txt
option Duplicate the specified directory with the specified name
$ cp -r test test_copy
mv Move the specified file or directory with the specified name
$ mv test.txt ../test_copy.txt
rm Delete the file with the specified name
$ rm test.txt
option Delete the directory with the specified name
$ rm -r test
Make sure to delete the directory with the specified name without warning
$ rm -rf test
Recommended Posts