- subscription-manager register --username USER --password PASSWORD --auto-attach
2. subscription-manager repos --enable=rhel-7-server-optional-rpms
2. subscription-manager repos --enable=rhel-7-server-optional-rpms
https://www.youtube.com/watch?v=0L-lFCbOVgk
sudo su -
mkdir /temp
mount /dev/sda5 /boot
cd /boot
cp state.tgz /temp
cd /temp
tar -xf state.tgz
tar -xf local.tgz
rm *.tgz
cd etc
nano shadow
cat shadow
root::18355
cd ..
you are in /temp
tar -cf local.tgz etc/
tar -cf state.tgz local.tgz
mv state.tgz /boot
umount /boot
reboot
set a new password
/home
partition.# du -a /home | sort -n -r | head -n 5
# du -a | sort -n -r | head -n 5
du
command: Estimate file space usage.a
: Displays all files and folders.sort
command : Sort lines of text files.-n
: Compare according to string numerical value.-r
: Reverse the result of comparisons.head
: Output the first part of files.-n
: Print the first ‘n’ lines. (In our case, We displayed first 5 lines).# du -hs * | sort -rh | head -5
# du -Sh | sort -rh | head -5
du
command: Estimate file space usage.-h
: Print sizes in human readable format (e.g., 10MB).-S
: Do not include size of subdirectories.-s
: Display only a total for each argument.sort
command : sort lines of text files.-r
: Reverse the result of comparisons.-h
: Compare human readable numbers (e.g., 2K, 1G).head
: Output the first part of files.# find -type f -exec du -Sh {} + | sort -rh | head -n 5
find
command:# find /home/tecmint/Downloads/ -type f -exec du -Sh {} + | sort -rh | head -n 5 OR # find /home/tecmint/Downloads/ -type f -printf "%s %p\n" | sort -rn | head -n 5