File recovery on Linux after rm

I accidently remove a file with rm.

==When deleting, inode disconnected and release space.
==

#So I tried:
{

Df #check out which drive is root in


debugfs


Open [drive name,/dev/mapper/ubuntu--vg-root in my case]


lsdel

}

#I failed to found anything

#Try software extundelete.

I use sudo extundelete /dev/mapper/ubuntu--vg-root --restore-all because I have no time to read the manual.

#Use grep to find the correct file I want in dictionary RECOVERED_FILES.


#Success in my case.

Some reminding on constructors

#Never use a type label at the constructors like void….Never.


#Declare it with public.


#Not every method/function that has the same name with its type is called constructor.


#Constructors always executes when you new something.


#Don’t put everything in it.


#Looking for more…

Building SSH server on arukas.io

#The following content no longer works…

#Create a regular 512Mb RAM application with Docker image: jdeathe/centos-ssh:latest

#Found document of configuration in https://hub.docker.com/r/jdeathe/centos-ssh/

#According to the document, open tcp port 22 to the public for ssh protocol connection.

#In my case, port 2020, 4443 and 25565 also opens in tcp for other purposes.

#According to the document, set up environment variables:

SSH_SUDO=ALL=(ALL) NOPASSWD:ALL
SSH_USER=████
SSH_USER_PASSWORD=████
SSH_AUTHORIZED_KEYS=ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAikXL8TXKhADkOOjwEcE0tx792JMYR9mvlRTi+koG0Wb+0s6ouc████████████████████████████████████████████████████lDeqAwjJFC0er1oR6SHjgwxVU9uUfXS+AA03thfgK60CaWRUmCCUbc3vGqCyNMN44WfTMDiEz9zzeDpsrV+1/vQnxSO+K8eWhIV2jmyPMfc9z7QAs7USPfGY7TeLrFgb8m3AuFXFSdwdBp2rmPcLZbjZ9nNNR+f7eZLBn/wwE8z+rCevcprNoZgEn/0sUoHFQ== rsa-key-20161028

#Try previeous SSH-2 RSA keys but failed. Error: server rejects our key.

#Environment variable SSH_USER_PASSWORD=██████ does not take in effect for unknown reasons. Error: Fatal error: No supported authentication methods available (server sent: public key,gssapi-key-keyex,gssapt-with-mic)[From putty_V0.63.0.0.43510830]

#Generate a new pair of SSH-2 RSA keys from puttygen. Update environment variable: SSH_AUTHORIZED_KEYS with the new public key.

#Try reconnect with private key. Success.

[Warn]: Server domain name and ports mapped is dynamic every restart.

[Info]: Red-hat linux system used in this server.

[Info]: Installed package “screen” with command “sudo yum install screen -y”

*****Server/Client configuration Complete!*****

Building shadow socks server on arukas.io and connect it with a regular client

The following content no longer works…

Building shadow socks server on arukas.io

#Start a regular application with 512 Mb RAM with Docker image: lowid/ss-with-net-speeder:latest from Docker Hub.

#At least one tcp port need to be open to the public network. No environment variables is needed.

#Start the application with: ssserver -p [tcp port] -k [password] -m [encrption] in the CMD section.
In this case, I use: ssserver -p 1111 -k 123123 -m aes-256-cfb

*****done with server configuration*****

connect it with a regular client

#Commonly, just connect the server with the given domain name and password will work.

#in my case, there an error reported as:

System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.InvalidOperationException: 此实现不是 Windows 平台 FIPS 验证的加密算法的一部分。
在 System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
--- 内部异常堆栈跟踪的结尾 ---`

Solved by switching the key value of “enable” in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy to 0.

*****done with client configuration*****

Ps: This docker platform have a good network bandwidth which I really like. But it changes its domain name for tcp protocol ports and always change my application size from 512mb to 256mb automaticlly for some reason.