DEV Community

Philip
Philip

Posted on

Useful Command line commands

pwd show directory

ls show all files in directory

ls -all info about files

ls -a shows hidden files

clear clears screen

cd change directory / redirects to home

cd .. go backwards

cd - goes to prev directory

mkdir new-folder make a directory

touch new-file.txt make a new file

cp new-file.txt new/folder/new-file-copy.txt make a copy

mv new-file-copy.txt ../new-file-copy.txt moves a file

mv file.txt file-2.txt rename a file

up/down arrow keystoggle prev next commands

rm new-file-copy.txt removes a FILE

rm -r new-folder deletes all files and folder

cat file-name.txt view whats in a file/s

cat file1.txt file2.txt > file3.txt concatenates two files

> pipes content into a file or over rides

echo Hi prints HI

echo Hi >> file3.txt HI gets added to end of the file content

man provides documentation eg man ls

nano manage file content / file editor

ctrl + c exits process

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay