Posts

Showing posts from January, 2018

mkdir abc && cd $_

mkdir abc && cd $_

tomcat roles nad components

manager-gui  — Access to the HTML interface. manager-status  — Access to the "Server Status" page only. manager-script  — Access to the tools-friendly plain text interface that is described in this document, and to the "Server Status" page. manager-jmx  — Access to JMX proxy interface and to the "Server Status" page. down vote Catalina  is Tomcat's servlet container. Catalina implements Sun Microsystems' specifications for servlet and JavaServer Pages (JSP). In Tomcat, a Realm element represents a "database" of usernames, passwords, and roles (similar to Unix groups) assigned to those users. Different implementations of Realm allow Catalina to be integrated into environments where such authentication information is already being created and maintained, and then use that information to implement Container Managed Security as described in the Servlet Specification Coyote  is a Connector component for Tomcat that supports

colon usage as true | fork bomb :(){ :|: & };: | POSIX

Portable Operating System Interface ( POSIX ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems : > file > file That is a forever-loop. function doSomethingStub { : } =========================== if [ "$T1" = "$T2" ] then : else echo "Nope" fi In that case, the ":" is just a "do-nothing" place holder. =========================== The colon (:) is a UNIX bourne shell "No op" (no operation). It does nothing and always returns Success. For example, in the following command: rm $COMMDIR/LOG* $COMMDIR/DATA.* >./$scriptName.log 2>/dev/null ; : The overall return code will be true even if it did not succeed, that is, if there were no files to remove. =========================== fork bomb : (){ :|: & }; :  =========================== Historically , Bourne shells didn't have  true  and  fa

Find and remove large files that are open but have been deleted | find /folder/ -printf '%s %p \n' | sort -nr | head -10

Find top large files: find /folder/ -printf '%s %p \n' | sort -rh | head -10 find -type f -exec du -Sh {} + | sort -rh | head -n 5 To truncate it: : > /path/to/the/file.log If it was already deleted, on Linux, you can still truncate it by doing: : > "/proc/$pid/fd/$fd" Where  $pid  is the process id of the process that has the file opened, and  $fd  one file descriptor it has it opened under (which you can check with  lsof -p "$pid" . If you don't know the pid, and are looking for deleted files, you can do: lsof -nP | grep '(deleted)'

tmux hotkeys Ctrl-b " - horizontal Ctrl-b % - vertical Ctrl-b o - swap panes Ctrl-b ; - swap cursor

Ctrl-b " - horizontal Ctrl-b % - vertical Ctrl-b o - swap panes Ctrl-b ; - swap cursor