Created
December 27, 2017 06:14
-
-
Save ManishLSN/10079caf50af1e3da199eaa547c7337f to your computer and use it in GitHub Desktop.
willl keep all usefull commands here
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for setting node path in windows | |
setx NODE_PATH "%NODE_PATH%;C:\Users\winbdows 7\AppData\Roaming\npm\node_modules" |
to kill particular port.
sudo npx kill-port 5432
clear memory cache from Linux ubuntu.
sync; echo 3 | sudo tee /proc/sys/vm/drop_caches
for renew the letsencrypt certificates.
sudo certbot renew
Create alias in ubuntu
nano ~/.bashrc
write something alias like below.
alias apachelog='cd /var/log/apache2'
alias cronlog='cd /var/log/mysite/cron'
alias egrep='egrep --color=auto'
alias fdate='date "+%Y%m%d.%H%M%S"'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l='ls -CF'
alias la='ls -A'
alias ll='ls -alF'
alias ls='ls --color=auto'
alias n='nano'
alias site='cd /var/www/vhosts/mywebsite/httpdocs'
alias sitelog='cd /var/log/mywebsite/httpdocs'
alias findinsite="searchin(){ find /var/www/vhosts/mywebsite/httpdocs/ -xdev \( -path '*/.git/*' -o -path '*/.svn/*' -o -path '*/assets/css/*' -o -path '*/assets/js/*' \) -prune -o -type f -exec grep -H -e \"\$*\" {} +;}; searchin"
alias findincrm="searchincrm(){ find /var/www/vhosts/mywebsite/crm-v2/ -xdev ! -path '/var/www/vhosts/mywebsite/crm-v2/.git/*' ! -path '/var/www/vhosts/mywebsite/crm-v2/old_vendor/*' -type f -exec grep -H -e \"\$1\" {}>
After saving the file, please run source cmd to get it executable.
source ~/.bashrc
then you can run this directly like
findinsite HelloWorld
for renew the letsencrypt certificates.
sudo certbot renew
To check SSL Date range:
echo | openssl s_client -connect 13.xxx.xxx.91:443 2>/dev/null | openssl x509 -noout -dates
Find all files based on extensions related
find . -name \*.log -ls | sort -r -n -k7
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
list out the last updated files.