DEV Community

Giulia Chiola
Giulia Chiola

Posted on • Originally published at giuliachiola.dev

2 1

Shell cheatsheet

Few commands I found very useful during development.

Command Description
man ls show manual for command 'ls'
wc <file> words count
rm <file> remove/delete file
rm -i <file> remove/delete file (interactive, ask confirm)
rmdir <directory> remove/delete directory
rm -R <directory> remove/delete directory and subdirectory
rm -iR <directory> remove/delete directory (interactive)
cp <current location> <destination> copy files
chmod -R 755 <folder> add writing permission to folder
pwd present working directory / print working directory
cd change directory
mkdir make directory
ls list files
ls -l list files (long form)
ls -lah list files (long form, all also hidden, human readable)
touch [filename] create file
chown change owner
cat <file> show file
<cmd> > <file> direct the output of "cmd" into "file"
grep -rl "<text>" <dir> search for all files containing <text> inside <dir>
ln symbolic link
alias show available alias on shell
cd - go to the previous current directory
ctrl + r advanced search (search any word in bash history)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

👋 Kindness is contagious

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

Okay