Skip to content

Linux Commend Line

Posted on:February 17, 2023 at 12:43 AM

Basic Commands

# show document of command
man curl


# list all files in current directory
ls
# list all files in current directory, including hidden files
ls -a
ls --all
# list all files in current directory, including hidden files, with details
ls -l
# including file size
ls -lh
# sort in descending chronological order
ls -lht
# list all files in the target directory, with details
ls -l /etc/

# display the contents of a file
cat file.txt

# show recent commands
history

# create a new file/directory
touch test.txt

# download file from the internet
curl -I https://www.google.com

# unzip file
tar -xvf file.tar.gz