Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
linux:commands [2020/01/21 17:50] – [Misc] tmade | linux:commands [2020/03/13 11:51] – [Misc] tmade |
---|
date +'%H%M%S%N' #Get date for a timestamp (e.g."104304330764740") with milliseconds at the end | date +'%H%M%S%N' #Get date for a timestamp (e.g."104304330764740") with milliseconds at the end |
du -a / | sort -n -r | head -n 30 #Find 30 biggest files in / | du -a / | sort -n -r | head -n 30 #Find 30 biggest files in / |
du -mx / | sort -rn -k1 | head #Stay on filesystem for mount "/" | du -mx / | sort -rn -k1 | head #Stay on filesystem for mount "/" and show usage sorted by size |
| for i in /var/*; do echo $i; find $i |wc -l; done #count i-nodes in "/var" |
| du -h $(ls) > /root/size #Pipe each file in actual folder + cumulated filesize into file "size" |
| du -h | sort -n > filesize #Pipe filesize incremental sorted into file "filesize" |
top / ps : | top / ps : |
ps afwwwwxo user,pid,%cpu,%mem,vsz,rss,wchan=WIDE-WCHAN-COLUMN,stat,start,cputime,comm | ps afwwwwxo user,pid,%cpu,%mem,vsz,rss,wchan=WIDE-WCHAN-COLUMN,stat,start,cputime,comm |
for t in files links directories; do echo `find . -type ${t:0:1} | wc -l` $t; done 2> /dev/null #Check how many files, symlinks and folders in a directory (recursive) | for t in files links directories; do echo `find . -type ${t:0:1} | wc -l` $t; done 2> /dev/null #Check how many files, symlinks and folders in a directory (recursive) |
for t in files links directories; do echo `find . -maxdepth 1 -type ${t:0:1} | wc -l` $t; done 2> /dev/null #Check how many files, symlinks and folders in a directory (not recursive) | for t in files links directories; do echo `find . -maxdepth 1 -type ${t:0:1} | wc -l` $t; done 2> /dev/null #Check how many files, symlinks and folders in a directory (not recursive) |
du -h $(ls) > /root/size #Pipe each file in actual folder + cumulated filesize into file "size" | |
du -h | sort -n > filesize #Pipe filesize incremental sorted into file "filesize" | |
grep "^[^#;]" test.conf #Showing just lines beginning without "#" from file test.conf | grep "^[^#;]" test.conf #Showing just lines beginning without "#" from file test.conf |
p3=$(/bin/ps -ef |grep "searchstring" |grep -v grep |rev |cut -d " " -f 1 |rev) | p3=$(/bin/ps -ef |grep "searchstring" |grep -v grep |rev |cut -d " " -f 1 |rev) |