Check These Out
Must be run as root.
The 'tomcat' user must have access to the .keystore file.
The key and keystore passwords must be the same.
The password must be entered into the server.xml config file for Tomcat.
[Click the "show sample output" link to see how to use this keystroke.]
Meta-p is one of my all time most used and most loved features of working at the command line. It's also one that surprisingly few people know about. To use it with bash (actually in any readline application), you'll need to add a couple lines to your .inputrc then have bash reread the .inputrc using the bind command:
$ echo '"\en": history-search-forward' >> ~/.inputrc
$ echo '"\ep": history-search-backward' >> ~/.inputrc
$ bind -f ~/.inputrc
I first learned about this feature in tcsh. When I switched over to bash about fifteen years ago, I had assumed I'd prefer ^R to search in reverse. Intuitively ^R seemed better since you could search for an argument instead of a command. I think that, like using a microkernel for the Hurd, it sounded so obviously right fifteen years ago, but that was only because the older way had benefits we hadn't known about.
I think many of you who use the command line as much as I do know that we can just be thinking about what results we want and our fingers will start typing the commands needed. I assume it's some sort of parallel processing going on with the linguistic part of the brain. Unfortunately, that parallelism doesn't seem to work (at least for me) with searching the history. I realize I can save myself typing using the history shortly after my fingers have already started "speaking". But, when I hit ^R in Bash, everything I've already typed gets ignored and I have to stop and think again about what I was doing. It's a small bump in the road but it can be annoying, especially for long-time command line users. Usually M-p is exactly what I need to save myself time and trouble.
If you use the command line a lot, please give Meta-p a try. You may be surprised how it frees your brain to process more smoothly in parallel. (Or maybe it won't. Post here and let me know either way. ☺)
At client side:
tar c myfile | nc localhost 7000 ##Send file myfile to server
tar c mydir | nc localhost 7000 ## Send directory mydir to server
Sometimes it's useful to output just the ip address. Or some other information, changing the "ipv4.addresses" in command. The power of awk! Show all possible "greps" with
$ nmcli connection show [yourInterfaceNameHere]
% cat ph-vmstat.awk
# Return human readable numbers
function hrnum(a) {
b = a ;
if (a > 1000000) { b = sprintf("%2.2fM", a/1000000) ; }
else if (a > 1000) { b = sprintf("%2.2fK", a/1000) ; }
return(b) ;
}
# Return human readable storage
function hrstorage(a) {
b = a ;
if (a > 1024000) { b = sprintf("%2.2fG", a/1024/1024) ; }
else if (a > 1024) { b = sprintf("%2.2fM", a/1024) ; }
return(b) ;
}
OFS=" " ;
$1 !~ /[0-9].*/ {print}
$1 ~ /[0-9].*/ {
$4 = hrstorage($4) ;
$5 = hrstorage($5) ;
$9 = hrnum($9) ;
$10 = hrnum($10) ;
$17 = hrnum($17) ;
$18 = hrnum($18) ;
$19 = hrnum($19) ;
print ;
}
This command gives you the number of lines of every file in the folder and its subfolders matching the search options specified in the find command. It also gives the total amount of lines of these files.
The combination of print0 and files0-from options makes the whole command simple and efficient.
this command gives you the total number of memory usuage and open files by the perticuler PID.
ls -Q will show the filenames in quotes. xargs -p rm will print all the filenames piped from ls -Q and ask for confirmation before deleting the files.
without the -Q switch, if we have spaces in names, then the files won't be deleted.