Get octal permissions from terminal and add to command shortcuts


You may run this line stand alone

stat -f '%A %a %N' *
and if you with to use this command regularly add a shortcut to it
alias lso="stat -f '%A %a %N' *"


Add the above line in .bash_profile

Open a terminal, enter 

source ~/.bash_profile

Then try the lso command which will provide you with octal permission display in terminal.



Linux attached and detach screen



While downloading in progress, you can press “Ctrl-A” and “d“. You will not see anything when you press those buttons. The output will be like this:

[detached from]
pungki@mint ~ $

Re-attach the screen

After you detach the screen, let say you are disconnecting your SSH session and going home. In your home, you start to SSH again to your server and you want to see the progress of your download process. To do that, you need to restore the screen. You can run this command:

pungki@mint ~ $ screen -r