Showing posts with label terminal. Show all posts
Showing posts with label terminal. Show all posts

3/07/2025

Find the largest directories in your home

.

# Find the largest directories in your home

du -h --max-depth=1 ~ | sort -rh | head -20


# Find the largest files

find ~ -type f -exec du -h {} \; | sort -rh | head -20


# Alternatively for a cleaner view of largest files

find ~ -type f -size +100M -exec ls -lh {} \; | sort -k 5 -rh | head -20

..


Thank you


7/11/2021

Hide current working directory in terminal

 

do it on your terminal

$ export OLD_PS1=$PS1                    # save Long Prompt to OLD_PS1
$ export PS1="\u > "export PS1="\u $ "   # change to PS1 to Short Prompt
$ export PS1=$OLD_PS1                    # restore Long Prompt to PS1

12/10/2020

linux screen command list in summary

*create screen
screen -S name

*leave with alive
Ctrl a, d

*enter screen 
screen -r name 

*kill specific screen
screen -S name -X quit

*show screen list
screen -ls

*detach specific screen

screen -d name


*kill all screen
killall screen