How to disable IPv6 support in a Java program
Answer:
To completely turn off IPv6 support in Java, you can set the system property "java.net.preferIPv4Stack", e.g.
# java -Djava.net.preferIPv4Stack=true ...
Linux Ask! is a Q & A web site specific for Linux related questions. Questions are collected, answered and audited by experienced Linux users.
How to disable IPv6 support in a Java program
Answer:
To completely turn off IPv6 support in Java, you can set the system property "java.net.preferIPv4Stack", e.g.
# java -Djava.net.preferIPv4Stack=true ...
How to compress a directory to a zip file
Answer:
To compress a directory and all the files under this directory to a zip file, you can use
# zip -r output.zip directory
Echo without a newline at the end
Answer:
Normally when you use the echo command to print a string, it will append a newline at the end of the string. To skip the newline, you can try using the "-n" argument.
# echo -n "hello"
Perform AES256 encryption on a string using command
Answer:
To encrypt a string using AES256, you can use the openssl tool.
# echo -n 'apple' | openssl enc -aes256 -k password -nosalt -iv 0 -a -p
key=1F3870BE274F6C49B3E31A0C6728957F0628DEF3179C824405825F85F5527096
iv =00000000000000000000000000000000
PMcE/8RE+RLRlQWT5tlLWA==
Install AWS tools on Ubuntu
Answer:
To install the AWS tools on Ubuntu, you can use the PPA repository:
1. Add the repository
# sudo apt-add-repository ppa:awstools-dev/awstools
# sudo apt-get update
2. Install it
# sudo apt-get install ec2-api-tools