You call them swear words, I call them sentence enhancers.
Edit a file (cleanup.bat) on your desktop and double-click on it to clean the junk in your system:
@echo off
del /s /f /q c:\windows\temp\*.* # Delete Temporary Files
rd /s /q c:\windows\temp # It removes the c:\windows\temp directory
md c:\windows\temp
del /s /f /q C:\WINDOWS\Prefetch # It removes Windows prefetch (del /s /f /q "%SystemRoot%"\prefetch\* is another option)
del /s /f /q %temp%\*.*
rd /s /q %temp% # The TEMP environment variable specifies the location in which most programs place temporary files. The q parameter avoids confirmation prompts to delete files or directories, and s is for deleting all files and subfolders in the temp folder.
md %temp%
deltree /y c:\windows\tempor~1
deltree /y c:\windows\temp
deltree /y c:\windows\tmp
deltree /y c:\windows\ff*.tmp
deltree /y c:\windows\history
deltree /y c:\windows\cookies
deltree /y c:\windows\recent
deltree /y c:\windows\spool\printers
del c:\WIN386.SWP
del /s /f /q “%USERPROFILE%\Local Settings\Temporary Internet Files”*.* # It removes temporary internet files
rd /s /q “%USERPROFILE%\Local Settings\Temporary Internet Files”
md “%USERPROFILE%\Local Settings\Temporary Internet Files”
del /s /f /q “%USERPROFILE%\Local Settings\Temp”*.*
rd /s /q “%USERPROFILE%\Local Settings\Temp”
md “%USERPROFILE%\Local Settings\Temp”
del /s /f /q “%USERPROFILE%\Cookies”*.*
rd /s /q “%USERPROFILE%\Cookies”
md “%USERPROFILE%\Cookies”
cls
gedit /root/.bashrc:
The “locate” command is the fastest way of searching: locate fileName. The reason is that it is not actually searching your local hard disks, but reads through the mlocate.db database file which contains all file paths in your system). Another slower alternative to find files is: find . -name “fileName”
#!/bin/bash
# The archlinux-keyring package contains the latest keys.
pacman -S archlinux-keyring
# Reflector is a Python script that can retrieve the latest mirror list from the Arch Linux Mirror Status page.
# It selects the 5 most up-to-date mirrors from a specified location, sorts them by speed, and overwrites the file /etc/pacman.d/mirrorlist.
sudo reflector --verbose --country 'Spain' --latest 5 --sort rate --save /etc/pacman.d/mirrorlist
# Update all installed packages and verify their integrity.
sudo pacman -Syyu
# Update UAR packages.
yay -Syu
# Delete Pacman cache.
sudo pacman -Scc
# Delete Yay cache.
yay -Scc
# Delete unwanted dependencies.
yay -Yc
# Remove orphaned packages.
sudo pacman -Rns $(pacman -Qtdq)
# Clean the Cache.
rm -rf .cache/*
# Clean the journal. Journalctl is a utility for displaying logs from journald, systemd's logging service.
sudo journalctl --vacuum-time=2weeks
# Update the database of the files currently on your system. It is used with locale.
sudo updatedb
Let’s use rsync to mirror HOME directory to an external drive (/media/mydisk/).
The --delete flag tells rsync to delete any files at the destination that are not currently at the source. -aAXv means that the files are transferred in “archive” mode, which ensures that symbolic links, permissions, ownerships, modification times, ACLs, and extended attributes are preserved.
rsync -aAXv --delete $HOME /media/mydisk/home