First create a singleton class. If we will try to clone it, it will throw Exception. Now try to break the Singleton with Reflection How to prevent Object Creation with Reflection - Check in the private constructor if object already created then throw an exception. If we run the reflection code, we will get this exception. Prevent Singleton Class from Serialization We have to override the read resolve method
ls -lrt → command lists the contents of the directory with all the details, in reverse order of their modification time (older files will be displayed first) ls -lrth → This will list the contents of the current directory showing more information and sorting them so the most recently modified file will be displayed last. The h flag makes the file sizes more human friendly! chmod 755 <name> → chmod 755 sets the 755 permission for a file. 755 means full permissions for the owner and read and execute permission for others. ln -s 14.9.0-SNAPSHOT current → Create a current tag and mapped to current version. To link files in the same directory Update Any File → sed -i 's/10.46.87.148/10.46.87.115/g' journal.sch textToFind → 10.46.87.148 replaceText → 10.46.87.115 FileName → journal.sch . SED is a text stream editor used on Unix systems to edit files quickly and efficiently Untar a tar file → tar -xvzf filename.tar Rmove a folder → rm -r folderName netstat -anpe | grep ...
Comments
Post a Comment