Useful tricks with Wireshark.
How to use Wireshark to list all browsers and operating systems on a LAN. This is very interesting.
How to use Wireshark to list all browsers and operating systems on a LAN. This is very interesting.
How to list all files in a directory that have spaces in the filename. This is a very useful Linux tip.
This is how to list all directories starting with a . on Linux. This is a very useful Linux trick. ┌──(john㉿DESKTOP-PF01IEE)-[~] └─$ ls -ld .*/ drwxr-xr-x 11 root root 4096 Feb 12 09:02 ../ drwxr-xr-x 21 john john 4096 Jun 15 15:58 ./ drwx—— 3 john john 4096 Feb 8 07:38 .BurpSuite/ drwx—— 7 john … Read more
It is possible to list interfaces with Nmap. This is a good way to see all active network devices attached to your computer. Use the –iflist parameter as shown below to show all network interfaces on your machine. jason@jason-Lenovo-H50-55:~$ nmap –iflist Starting Nmap 7.80 ( https://nmap.org ) at 2022-03-18 10:38 AEDT ************************INTERFACES************************ DEV (SHORT) IP/MASK … Read more
Listing files on a remote machine is very easy. Rsync is the best way to do this. It can be used to transfer a bunch of files from one machine to another, but it also can be used to list a remote directory. Here is a very useful example. ┌──[[email protected]]─[~] └──╼ ╼ $ rsync –list-only … Read more
There are many ways to get detailed information on known users on your Linux system. The lslogins command is therefore very useful for listing all usable login accounts. The below example will list all user accounts including the root account. This might be disabled on an Ubuntu system, but it is worth listing it anyway. … Read more
This one-liner will display all users with UIDs over 999 and under 2000. This includes valid users on an Ubuntu system but may be different on other machines. ┌──[[email protected]]─[~/Documents] └──╼ ╼ $ awk -F: ‘{if($3>999 && $3<2000)print $1,$3,$6}’ /etc/passwd jason 1000 /home/jason kirk 1001 /home/kirk┌──[[email protected]]─[~/Documents] └──╼ ╼ $ awk -F: ‘{if($3>999 && $3<2000)print $1,$3,$6}’ /etc/passwd … Read more
This is how to get information about recently installed packages on Ubuntu. This is looking at the lowlatency package I just installed. 4.4 Thu Jun 04 jason@Yog-Sothoth 0: $ grep "lowlatency" /var/log/apt/history.log | sed "s/ /\n/gi"; Commandline: apt install linux-image-5.3.0-24-lowlatency Install: linux-image-5.3.0-24-lowlatency:amd64 (5.3.0-24.26~18.04.2), linux-modules-5.3.0-24-lowlatency:amd64 (5.3.0-24.26~18.04.2, automatic) Commandline: apt-get install –reinstall linux-image-5.3.0-24-lowlatency Reinstall: linux-image-5.3.0-24-lowlatency:amd64 (5.3.0-24.26~18.04.2) Commandline: … Read more
This command will list all installed hard disks in your system. This is using the -S parameter to only list SCSI devices. 𒅑 4.4 Mon Mar 23 jason@Yog-Sothoth 0: $ lsblk -n -S sda 0:0:0:0 disk Seagate Expansion Desk 0911 usb sdb 1:0:0:0 disk ATA ST3500418AS CC38 sata sdc 3:0:0:0 disk ATA ST3360320AS N sata … Read more
List all symbolic links in a folder is very easy, this is how to find just the symlinks and not bother with any other files. This example shows how to use the find command to do this. 4.4 Tue Feb 04 jason@Yog-Sothoth 0: $ find . -type l ./boom ./chocolate-strife-setup ./LS ./heretic ./doom ./cowthink ./chocolate-doom-setup … Read more
This command will only list the mounted removable drives on your Linux system. The ones under /dev/sd*. This is very easy to use. 4.4 Mon Jan 13 jason@Yog-Sothoth 0: $ cat /etc/mtab | grep /dev/s[a-f]/* /dev/sda2 /media/jason/Seagate\040Expansion\040Drive fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0 /dev/sdb4 /media/jason/My\040Stuff fuseblk rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 04.4 Mon Jan 13 jason@Yog-Sothoth 0: $ cat /etc/mtab … Read more
A Debian deb package is an archive that contains files to be installed on your system. There are ways to list the contents of a deb package before installation. Use the dpkg(1) command to achieve this easily. List all files in the deb archive. ┌─[✗]─[jason@darkstar]─[~] └──╼ $dpkg –contents brave.deb┌─[✗]─[jason@darkstar]─[~] └──╼ $dpkg –contents brave.deb List all … Read more
A Linux system can have a lot of users in the /etc/passwd file. But it is easy to keep track of your users with the command line. The lslogins command will print a listing of known users on your Linux system. An example of the usage. jason@jason-Virtual-Machine:~$ lslogins UID USER PROC PWD-LOCK PWD-DENY LAST-LOGIN GECOS … Read more
Printing user information such as the username and home directory for each user on your system is very easy with awk. Use this simple post to get this information. This will help you out if there are a lot of users on your system and you wish to list them all.
How to list all drives on your Linux computer that are actually mounted. The findmnt utility can do this for you. It prints a tree listing of all mounted partitions on your Linux machine. The output below is an example. 4.4 Wed Feb 13 jason@Yog-Sothoth 0: $ findmnt TARGET SOURCE FSTYPE OPTIONS / /dev/mapper/fedora-root ext4 … Read more
The ls command on Mac OSX works a little differently than on a Linux machine, but listing only directories is very simple. This is one example, using only the ls command. deusexmachina:Documents jason$ ls -ld — */ drwxr-xr-x 3 jason staff 102 5 Mar 2018 POL/ drwxrwxrwx 31 jason staff 1054 7 Jan 2018 Stalker … Read more
List only directories with the Linux command line. This lists a directory with all folders listed first, then return only the listing of folders in the directory. 4.4 Tue Oct 09 jason@Yog-Sothoth 0: $ ls –color=auto –group-directories-first -Hul | head -n `echo */ | wc -w` total 3866624 drwxrwxrwx+ 6 jason jason 4096 Oct 9 … Read more
This command will list all Gnome packages that are currently installed on your Debian system and can be uninstalled. 4.4 Mon Sep 10 jason@Yog-Sothoth 0: $ dpkg –get-selections | grep gnome | cut -f 14.4 Mon Sep 10 jason@Yog-Sothoth 0: $ dpkg –get-selections | grep gnome | cut -f 1 This example lists all Doom … Read more
This nice on-liner will list all dotfiles in your home directory that start with b to z. Another good way to accomplish this task. jason@Yog-Sothoth » ~ » $ ls -hula -d .[b-z]* |grep -v ^d -rw——- 1 jason jason 13K Jun 20 10:45 .bash_history -rw-r–r– 1 jason jason 220 Jun 20 10:45 .bash_logout -rw-rw-r– … Read more
This is a a good way to list multiple logfiles, this will list the main logfile and all of the backups. jason@Yog-Sothoth » ~ » $ ls -hula /var/log/dpkg.log{,.[0-9].gz} -rw-r–r– 1 root root 280K Jun 1 09:08 /var/log/dpkg.log -rw-r–r– 1 root root 23K Apr 2 06:48 /var/log/dpkg.log.2.gz -rw-r–r– 1 root root 17K Mar 5 13:26 … Read more