Press "Enter" to skip to content

Posts published in “Linux”

CentOS Basic Configuration


The CentOS Project is a community-driven free software effort focused on delivering a robust open source ecosystem. For users, CentOS offers a consistent manageable platform that suits a wide variety of deployments. For open source communities, CentOS offers a solid, predictable base to build upon, along with extensive resources to build, test, release, and maintain their code. 1. Find Out Installed Package [[email protected] /]$ rpm -qa |lessplymouth-0.8.9-0.24.20140113.el7.centos.x86_64libsoup-2.48.1-3.el7.x86_64libaio-0.3.109-13.el7.x86_64dmidecode-2.12-9.el7.x86_64passwd-0.79-4.el7.x86_64bind-libs-lite-9.9.4-29.el7_2.2.x86_64sed-4.2.2-5.el7.x86_64grub2-2.02-0.34.el7.centos.x86_64libcom_err-1.42.9-7.el7.x86_64rsyslog-7.4.7-12.el7.x86_64biosdevname-0.6.2-1.el7.x86_64dracut-config-rescue-033-360.el7_2.x86_64libacl-2.2.51-12.el7.x86_64openssh-clients-6.6.1p1-23.el7_2.x86_64xe-guest-utilities-6.5.0-1432.x86_64libgcrypt-1.5.3-12.el7_1.1.x86_64libpcap-1.5.3-8.el7.x86_64cronie-1.4.11-14.el7.x86_64iwl6050-firmware-…….[[email protected]

Basic Linux Commands (Tips and Tricks)


1. Basic Commands man : manualls :List Directory Contentspwd :print working directorycd :change directorymkdir :Make directorycp :Copymv :Movefind and locate and whereiskill passwd :Passwordmd5sum :Compute and Check MD5 Message Digesthistory :History (Event) Record。sudo :(super user do)touch :Update the access and modification times of each FILE to the current timechmod :change file mode bitschown :change file owner and groupapt :Advanced Package…

Linux : find big file in the all directories


1. Juniper Firewall   find . -type f -size +10000 -exec ls -lh {} ;  Sample output: [email protected]% find . -type f -size +10000 -exec ls -lh {} ; -rw-r–r–  1 930  929   134M Jan  5 17:34 ./cf/packages/junos-11.4R6.6-domestic-rw-r–r–  1 root  wheel   139M Sep  8  2011 ./cf/var/log/junos-srxsme-11.2R2.4-domestic.tgz-rw-r—–  1 root  wheel   4.9M Feb 11 17:12 ./cf/var/db/idpd/db/secdb_02.db-rw-r—–  1 root  wheel  …

Use your ssh key to encrypt / decrypt files


Create a file:echo ‘This is a sekret’ >/tmp/msg.txt Export public key:openssl rsa -in ~/private.pem -out /tmp/ -outform PEM -pubout Encrypt file with public key (anyone can have this key):openssl rsautl -encrypt -inkey /tmp/ -pubin -in /tmp/msg.txt -out /tmp/file.enc Decrypt the file with private key (only you should have the private key):openssl rsautl -decrypt -inkey ~/private.pem -in /tmp/file.enc -out /tmp/decrypted.txt Check…