前端常用的Linux命令

2023年 9月 12日 53.8k 0

Here is a list of some common Linux commands for front-end developers :))

pwd

current directory

mkdir {{name_of_your_directory}}

create a directory

cd {{relative_path_of_new_directory}}

change directory

# cd ./my-app let's say the current directory contains a my-app directory, this is for going into the my-app directory

# cd .. move from your current directory to a directory one level up

# cd / navigate to the root directory from anywhere

# cd ~ navigate to the home directory from anywhere,

ls

list all files in current directory

# ls -a list all files in current directory including hidden files

# ls -h list all files in current directory in a human readable format

touch {{name_of_file}}

create a new file

mv {{name_of_file}} {{relative_path_of_new_location}}

move a file

mv {{name_of_file}} {{name_of_new_file}}

rename a file

cp {{name_of_file}} {{relative_path_of_new_location}}

copy a file

cp -r {{name_of_directory}} {{relative_path_of_new_location}}

copy a directory

rm {{name_of_file}}

delete a file

rm -r {{name_of_directory}}

delete a directory

more {{name_of_file}}

read the whole file content

grep {{text_to_search}} {{name_of_file}}

search text inside a file

kill {{pid}}

kill a process with a specific id

lsof

find out which files are opened by which Linux process

# lsof -i tcp: -t list the pid running on a specific port

相关文章

服务器端口转发,带你了解服务器端口转发
服务器开放端口,服务器开放端口的步骤
产品推荐:7月受欢迎AI容器镜像来了,有Qwen系列大模型镜像
如何使用 WinGet 下载 Microsoft Store 应用
百度搜索:蓝易云 – 熟悉ubuntu apt-get命令详解
百度搜索:蓝易云 – 域名解析成功但ping不通解决方案

发布评论