free; ## memory left 2019-08-14
free -m;
pstree; ## 2019-08-14
- show the size of each directory in gigabytes: (2014-03-09)
for x in $(ls -1); do du -sh —block-size=1G $x; done | sort -nr | head -10 ;
chkconfig —add red5 ; ## add the RED5 service to chkconfig
chkconfig red5 on ; ## chkconfig that red5 should start asap when booting
strings – displays only printable strings in a binary file (2013-02-06)
nohup – nohangup – starts a process but does not terminate it once we log out (2013-02-05)
top -c ## monitors server processes 2013-01-29
sending mail from bash: 2013-01-25
- mail -s ‘TEST TEST Test Subject here’ \
-r mark@edwardsmark.com \
info@comptonpeslonline.com <
line one
line two
END
script to auto-run ftp from cron: 2013-01-18
#! /bin/bash
- -i turn off prompting during mget
- -n inhibit auto-login
- -v verbose
- lcd – i think ftp gets confused where it is
/usr/bin/ftp -inv edwardsmarkf.com <user mark jabberwalky
binary
lcd /var/www/domains/comptonpeslonline.com/
put ./x.x
bye
ENDFTP
#
to restart mysql 2013-01-20
/etc/init.d/mysqld restart
ldd —version ; ## 2012-01-14 – used to display the glibc version
linux has zip and unzip to match winzip! 2010-08-22
find / -size +100M -exec ls -l {} \; 2>/dev/null ;- only show files larger than 100 megabytes (2013-01-07)
- du -a /var | sort -n -r | head -n 10 ; ## find the top 10 largest directories
to copy an entire directory: (2009-11-14)
cp -r ./www ./www-SAVE
and another way: tar -cf – $filename | (cd
host – similar command to whois.net: (2009-11-14 – learned from westhost)
host -t mx englishwithoutaccent.com
how to get the size of a directory:
du -k ./html | tail -2;
find . -size +1024 –print
how to get an external zip file and unpack it: (from westhost)
curl http://X.org/X.tar.gz |tar -xzv —strip-components=1
how to “create” a tar file:
tar -cvvf home.tar home/