Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
tech_notes:linux_commands [2025-05-24 Sat wk21 17:14] – [Devices] baumkptech_notes:linux_commands [2026-03-22 Sun wk12 09:59] (current) – [ncdu] baumkp
Line 5: Line 5:
 =====File System===== =====File System=====
  
 +====Find specific file types====
 +  *Using ''ls'':
 +    *''ls -lhaF | grep ^l''   # list links
 +    *''ls -lhaF | grep ^d''   # list directories
 +    *''ls -lhaF | grep ^-''   # list files
 +
 +  *using ''find'':
 +    *''find . -type l -ls''
 +    *''find . -maxdepth 1 -type l -ls'' to process the current directory only, i.e. not recurse.
 +
 +References:
 +  *[[https://askubuntu.com/questions/522051/how-to-list-all-symbolic-links-in-a-directory|How to list all symbolic links in a directory]]
 +  *[[https://mywiki.wooledge.org/ParsingLs|Why you shouldn't parse the output of ls(1)]]
 ====check file system size==== ====check file system size====
  
Line 14: Line 27:
   *''du -s /tmp /var'' lists the summary of directories /var and /tmp only, where:   *''du -s /tmp /var'' lists the summary of directories /var and /tmp only, where:
     * ''-s'' set summaries      * ''-s'' set summaries 
 +  * ''%%sudo du -hd1 --exclude={/mnt,/run,/proc} /%%'' to check root (/).
 +    * It is important to exclude the noted directories as they are temporary or external drives.  Note I mount my external drives within ''/mnt'' This speed up performance and remove errors and associated messages, decluttering the output.
 ===ncdu=== ===ncdu===
-ncdu is a 'smart' version of nu.  It needs to be specifically installed, e.g. ''sudo apt install ncdu''+ncdu is a 'smart' version of du.  It needs to be specifically installed, e.g. ''sudo apt install ncdu''
-  *ncdu+  *''ncdu'' on the current directory 
 +  *''%%ncdu --exclude-kernfs --exclude /mnt /%%''  to check root (/) directory excluding system and mounts 
  
 +===df===
 +df - report file system space usage
 +  * ''df -h'' prints file system and spage usage in human readable format
 +
 +===duf===
 +duf - disk usage / Free utility, an updated version of df utility.  It needs to be specifically installed, e.g. ''sudo apt install duf''.
 +  * ''duf''
  
 =====Devices===== =====Devices=====
Line 43: Line 66:
     *volume     *volume
     *generic     *generic
 +
 +====man====
 +  *''apropos''
 +  *''%%man 5 crontab%%'' or ''%%man 'crontab(5)'%%'' will specifically list the man for contab(5)
 +  *
 +
 +====crontab====
 +''sudo crontab -e'' can be used to safely 
 =====Networking Specific===== =====Networking Specific=====
  
  
 <- tech_notes:programs|back ^ tech_notes:index|Start page ^ tech_notes:alpine|next-> <- tech_notes:programs|back ^ tech_notes:index|Start page ^ tech_notes:alpine|next->