Today I want to share some basic Unix commands I use recently in Putty.
- Directory: Direct the path to a certain location
cd /... cd - {home directory} pwd {show current working directory}
- Files: List current files
ls {path} ls -l {date,size, permission}
- Check/Change Access: Read is 4. Write is 2. Execute is 1.
ls -lah xyz(u,group,everyone else) readonly: chmod 444 *(a.file) write: chmod 644 *(a.file) everyone can read/write/execute chmod 777*
- Move directory
mv {folder/a} {folder/b}
- Zip/Unzip files
cd /folder zip -r x.zip dir1 unzip x.zip
- Execute SAS/Python code
cd /.. sas a.sas python a.py
- Copy/Delete files
Copy: cp {foler/a} {folder/b} Delete: rm {folder/a}
Thanks Yajnes and Grace share the Unix Code with me 🙂
Happy Studying!