Class information
Join CS50P Course
You need to do a test following these steps, like a demo.
Check
Submit
Going to CS50P VS Code workspce
Linux System Command
Python Code Editor
'pwd' : Print Working Directory
'ls' : List Files
'ls -la' : List All Files with Details
'cd' : Change Directory
'cd ..' : Move Up One Directory
'cd ~' : Move to Home Directory
$ pwd
/home/user
$ ls
Desktop Documents Downloads
$ ls -la
total 12
drwxr-xr-x 3 user user 4096 Oct 11 09:37 .
drwxr-xr-x 7 user user 4096 Oct 11 09:35 ..
-rw-r--r-- 1 user user 39 Oct 11 09:37 file.txt
$ cd Documents
Documents $ pwd
/home/user/Documents
Documents $ cd ..
$ pwd
/home/user
Documents $ cd ~
$ pwd
/home/user
'mkdir' : Make Directory
'touch' : Create Empty File
'cat' : Concatenate and Display File Content
'rm' : Remove File
'rm -f' : Force Remove File
'rm -r' : Remove Directory Recursively
'rm -rf': Force Remove Directory Recursively
$ mkdir new_directory
$ ls
Desktop Documents Downloads new_directory
$ touch new_file.txt
$ ls
Desktop Documents Downloads new_directory new_file.txt
$ echo "Hello, World!" > file.txt
$ cat file.txt
Hello, World!
$ rm new_file.txt
$ ls
Desktop Documents Downloads new_directory
$ rm -f file.txt
$ ls
Desktop Documents Downloads new_directory
$ rm -r new_directory
$ ls
Desktop Documents Downloads
$ mkdir new_directory
$ touch new_directory/new_file.txt
$ rm -rf new_directory
$ ls
Desktop Documents Downloads
$ clear