Why you should not rely on /bin/cat to read a script before running it…
How to write a script for Linux in bash that can hide code from cat.
How to write a script for Linux in bash that can hide code from cat.
How to get the date and time a partition was last mounted.
How to set the geometry of an MPV window in Xorg.
How to get information about users on a Linux system easily.
The ncdu command for Linux is very good for listing the sizes of the files in a directory. This has many very useful options for use day-to-day.
The new Tabby terminal is coded as an Electron app. This is a new terminal emulator for Linux. This works very well on Arch Linux. This was supplied as a *.pacman file. To query the file before installing, use this command. ┌──[[email protected]]─[~/Downloads] └──╼ ╼ $ pacman -Qpi tabby-1.0.167-linux.pacman Name : tabby-terminal Version : 1.0.167-1 Description … Read more
An obfuscated command like this is an example of one that you should never run. ┌──[[email protected]]─[~] └──╼ ╼ $ echo "ZWNobyBIYWhhaGFoYWhhaGFoYWhhaGFoYWhhaGFoYWhhaGFoYWhhaGFoYWhhaGFodG91Y2ggLS1mdWNreW91ISA+PiAtZnVja3UhCg==" | base64 -d | sh -s┌──[[email protected]]─[~] └──╼ ╼ $ echo "ZWNobyBIYWhhaGFoYWhhaGFoYWhhaGFoYWhhaGFoYWhhaGFoYWhhaGFoYWhhaGFodG91Y2ggLS1mdWNreW91ISA+PiAtZnVja3UhCg==" | base64 -d | sh -s This is the actual command it will run, this creates a file named “-fucku!”. But this can … Read more
This very nice one-liner will print some information about your mounted drives on Linux and also print a column header to dress up the output. ┌──[[email protected]]─[~/Downloads] └──╼ ╼ $ df -Hla | grep "[0-9]% /" | awk -F, ‘NR==1 {print "Device","Capacity","Free","Usage","Percentage","Mount"} {gsub(/"/,""); print $1,$2,$4}’ | column -t Device Capacity Free Usage Percentage Mount dev 13G … Read more
Happy Holidays everyone. I hope 2022 is better than 2021 has been!
How to mount a partition on Linux and make your old home directory accessible to your user To add a directory in a mounted drive as a folder accessible by a normal user, use this command to change the ownership of all files and directories to that of your current user. [root@darkstar Videos]# chown -R … Read more
Get information about the creation date of your root filesystem on Linux The Linux stat(1) utility will print information about your root filesystem. The Birth entry shows when the filesystem was created. This was the start of the Arch Linux installation procedure. ┌──[[email protected]]─[~/Desktop] └──╼ ╼ $ stat / File: / Size: 4096 Blocks: 8 IO … Read more
Tips for installing Arch Linux and getting started I have just installed Arch Linux 2021 and it is far faster to load than Ubuntu with the bloated codebase it has. After installation, I had an issue with the networking, but I installed Network Manager and this was a good way to get the installation working. … Read more
The Arch Linux distribution developer Bartłomiej Piotrowski has stepped down as a developer for the venerable Linux distribution. This is after 10 years of service maintaining this Linux distribution. But nothing lasts forever and he did very good work maintaining the distro. In other news, the Arch Linux distribution is getting a new installer, this … Read more
To get information about a Linux process, use this simple trick, this is to get the processes associated with the current standard input. I.e a terminal. jason@Yog-Sothoth:~/Documents$ ps -T PID SPID TTY TIME CMD 7467 7467 pts/0 00:00:00 bash 7715 7715 pts/0 00:00:00 top 7826 7826 pts/0 00:00:00 psjason@Yog-Sothoth:~/Documents$ ps -T PID SPID TTY TIME … Read more
Nice new Linux distro for a lower-specced machine The new Archlabs Linux distribution is a nice light Linux distribution that loads very quickly and has a nice default desktop theme. Right-click on the desktop to open the Arch Labs menu. This has not much in the way of software on the live disc, this can … Read more
The wpscan utility may be used to brute force a WordPress password very easily. But firstly, we need the WordPress username. Get it like this. Using Nmap. As Nmap supports user enumeration for WordPress, this is easy. ubuntu ~ $ nmap -sV –script http-wordpress-enum –script-args limit=195 somewordpresssite.com Starting Nmap 6.40 ( http://nmap.org ) at … Read more
This command will list all open files, sort them with awk and list the biggest space hogging files. lsof / | awk ‘{if($7 > 1048576) print $7/1048576 "MB" " " $9 }’ | sort -n -u | taillsof / | awk ‘{if($7 > 1048576) print $7/1048576 "MB" " " $9 }’ | sort -n -u … Read more