Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
shell [2019/07/15 19:02]
jdx
shell [2020/05/02 09:34] (current)
Line 1: Line 1:
 ====== Shell commands ====== ====== Shell commands ======
  
 +A nice cheatsheet is [[https://​devhints.io/​bash|available here]]
  
 ===== Get disk space usage ===== ===== Get disk space usage =====
Line 7: Line 8:
 </​code>​ </​code>​
  
-===== Get folder ​size ===== +===== Get a clean arborescence of a projet ===== 
-<​code>​du -hs folder/</​code>​+<​code>​ 
 +tree -a -I '​.git'​ -L 3 
 +</​code>​ 
 + 
 +===== Get the size of elements in the current folder ​===== 
 +<​code>​ 
 +du -chs * 
 +</​code>​
  
 ===== Find largest directories in current path ===== ===== Find largest directories in current path =====
Line 84: Line 92:
 vim /​etc/​sudoers.d/​{{ user }}-sudoer vim /​etc/​sudoers.d/​{{ user }}-sudoer
 {{ user }} ALL=(ALL:​ALL) NOPASSWD: ALL {{ user }} ALL=(ALL:​ALL) NOPASSWD: ALL
 +
 +# or if you want to keep password protection (more secure) :
 +{{ user }} ALL=(ALL:​ALL) ALL
 </​code>​ </​code>​
  
Line 119: Line 130:
 <​code>​ <​code>​
 gpg --gen-key gpg --gen-key
 +</​code>​
 +
 +===== Get a clean arborescence of a projet =====
 +<​code>​
 +tree -a -I '​.git'​ -L 3
 </​code>​ </​code>​
  
  • shell.1563217365.txt.gz
  • Last modified: 2020/05/02 09:33
  • (external edit)