DEV Community

StuartCreed
StuartCreed

Posted on • Edited on

3 1

Unix Linux Cheatsheet

Memory and File System Storage differences
Memory (short term storage - mostly RAM) gets erased when you restart your computer. It is used for things like browsing the web. Where as File System storage (log term storage) stays stored when you restart your computer. An analogy is a desk top and the draw underneath. The desk top is for quick access to items, but is limited in space. The desk top is cleared at the end of the day. The draw underneath can hold more storage and does not get cleared out at the end of the day.

Commands
cd ~ or cd Takes you to home
grep -r “string” * Searches for a string within the folders of directories. -r makes it look in the subfolders
du -sh * Finds the size of every directory in your current directory.
df -h Finds the file storage space left on your machine (long term memory)
To view the free short term memory in readable format:
free -h
ls -lrt lists a directory in updated at order.
ls -lrt NAME* to do a wild card search
| pipe - allows you to pipe one command into another
ping computer-name find out IP address on the some LAN.
/bin holds all of the compilers you have installed such as csh, ksh and bash.
crontab -l to view a crontab
crontab -e to edit a crontab with your default editor
nano file to edit a file in the nano editor

Vi editor commands
vi filename edits or creates a file
i is insert mode
v is visual mode - which also allows you to delete characters
x is delete character and dd is delete line
Esc to exit a mode
:wq to write and quit a file
:q to quit a file

Use the instructions in the following link to see how to search for executable files:
https://kb.iu.edu/d/acec

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (3)

Collapse
 
jethrojm profile image
Jethro Moller (He/Him)

I believe v is visual mode

Collapse
 
stuartcreed profile image
StuartCreed

Hi Jethro! Thanks for your comment :) Thanks for pointing that out, I didn’t notice that before :) I have edited the post to correct it.

Collapse
 
jethrojm profile image
Jethro Moller (He/Him)

You're welcome! :)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay