Site Tools


linux:general:basics

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
linux:general:basics [2020/07/07 11:55] lunetikklinux:general:basics [2022/12/16 10:41] (current) lunetikk
Line 66: Line 66:
 |  find /tmp -type f -atime +30 -delete  |  delete files in /tmp with no access in the last 30 days  | |  find /tmp -type f -atime +30 -delete  |  delete files in /tmp with no access in the last 30 days  |
 |  dpkg --print-architecture  |  show cpu architecture (amd64/i386/...) (debian/ubuntu only)  | |  dpkg --print-architecture  |  show cpu architecture (amd64/i386/...) (debian/ubuntu only)  |
-|  nmap -sL <IP like 192.168.178.*>  |  List all hosts in the given IP-range  |+|  nmap -sL <IP like 192.168.178.*>  |  list targets to scan in the given IP-range 
 +|  nmap -sn <IP like 192.168.178.*>  |  ping scan in the given IP-range  |
 |  yes %%|%% yum install <package>  |  submit yes - also works for other commands  | |  yes %%|%% yum install <package>  |  submit yes - also works for other commands  |
 |  du -hs * %%|%% sort -h %%|%% head    show files by size and sort by size  | |  du -hs * %%|%% sort -h %%|%% head    show files by size and sort by size  |
 +|  rm !(*.log)    remove all files except for *.log  |
 +|  ps -f -p <PID> -o lstart=  |  show starttime of process  |
 +|  install -d -o <user> -g <group> -m <mode> <path>  |  mkdir with specific user, group and rights  |
  
 ==== Save textfile with password (VIM) ==== ==== Save textfile with password (VIM) ====
Line 107: Line 111:
 ===== SLES Commands ===== ===== SLES Commands =====
  
-[[https://en.opensuse.org/images/3/30/Zypper-cheat-sheet-2.pdf|Zypper Cheat Sheet]]+[[https://en.opensuse.org/images/1/17/Zypper-cheat-sheet-1.pdf|Zypper Cheat Sheet 1]]\\ 
 +[[https://en.opensuse.org/images/3/30/Zypper-cheat-sheet-2.pdf|Zypper Cheat Sheet 2]]
  
 ^  Command  ^  Function  ^  Command  ^  Function 
Line 117: Line 122:
 |  zypper ar %%<%%REPOURL%%>%%  |  Add repository via REPOURL  |\\ |  zypper ar %%<%%REPOURL%%>%%  |  Add repository via REPOURL  |\\
 |  zypper mr -e %%<%%REPO%%>%%  |  Activate existing REPO  |\\ |  zypper mr -e %%<%%REPO%%>%%  |  Activate existing REPO  |\\
-|  zzypper se -s %%<%%PACKAGE%%>%%  |  Show all available packages incl. versions  |\\+|  zypper se -s %%<%%PACKAGE%%>%%  |  Show all available packages incl. versions  |\\
  
 ===== Redhat Commands ===== ===== Redhat Commands =====
Line 128: Line 133:
 |  yum repolist  |  Show enabled repositorys  |\\ |  yum repolist  |  Show enabled repositorys  |\\
 |  yum clean all  |  Clean all packages and meta data from cache  |\\ |  yum clean all  |  Clean all packages and meta data from cache  |\\
 +|  rm -rf /var/cache/yum  |  Clean all packages and meta data incl. orphaned data from cache  |\\
 |  yum update  |  Update all installed packages  |\\ |  yum update  |  Update all installed packages  |\\
 |  yum update %%<%%PACKAGE%%>%%  |  Update PACKAGE  |\\ |  yum update %%<%%PACKAGE%%>%%  |  Update PACKAGE  |\\
linux/general/basics.1594115736.txt.gz · Last modified: 2020/07/07 11:55 by lunetikk