Answer by Zoredache for Why does python still work after being removed?
You should probably look at the output of dpkg --get-selections | grep python to see all the installed python packages. There are a few packages for various different releases that may be installed on...
View ArticleNegate exit code without using shell features
Is there any standard command that will negate the the exit code of another command provided as an argument without using shell features, or starting a shell?I have a program that does something based...
View ArticleAnswer by Zoredache for Why I can't export the Linux DISPLAY?
Are yo trying to use SSH for forwarding, or not. It seems like you are trying to mix + match two methods here. One for forwarding with SSH, and that isn't used for ssh.If you want to forward via SSH...
View ArticleAnswer by Zoredache for Why is the "harden" suite of packages not available...
So looking through the bugs for harden I found the following two bugs.https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782978Subject: RM: harden -- RoQA; no longer useful Date: Sun, 19 Apr 2015...
View ArticleWorkaround for mount -bind behavior change between wheezy and jessie?
I recently upgraded a system from wheezy to jessie that makes use of bind mounts. But with the update the behavior of the bind mount has changed, and now acts as bind one filesystem will recursively...
View ArticleAnswer by Zoredache for Linux alternative to file history/shadow copies for...
The Windows 'Shadow Copy' aka 'Volume Shadow Copy Servce' does filesystem snapshotting. The Linux equivalent requires changing your filesystem/partitions, or possibly using 3rd party tools.OptionsLVM -...
View ArticleAnswer by Zoredache for Tips on using Linux without swap partition
I would fix it by going back and re-partitioning to give myself some virtual memory, but damn..You don't need to have a full partition dedicated to swap, and you don't need to re-partition.Create swap...
View ArticleWay to have a TCP/UDP echo on range of ports
Is there some quick command or thing I can do to make system basically echo or chargen on a large range tcp or udp ports?I am trying to play around with and learn more about nftables, and one thing...
View ArticleConfusion about output lost in pipeline with perl [duplicate]
I want to ping a remote system, and have the date show up in my output, and then feed it along the pipeline to another program. I used cat in my examples below only to be a simple example.I can use the...
View ArticleWhy does SSH add a known_host entry for an IP address?
I have a host named nms.example.org. In my /etc/ssh/ssh_known_hosts I have an entry for the host with the RSA key. This entry, and all the other entries are managed by my configuration management...
View ArticleAnswer by Zoredache for systemd: how can I run a script on start of a...
If you use systemd edit servicename.service you can apply local overrirdes to things in the unit. For your request you might want to adjust these...
View ArticleDeciding on a font, and determining the proper notation
I have an X11 program that allows you to set a font. It apparently accepts the 'standard'X Logical Font Description. This notation is fairly obscure, and while the document I linked to mentions it, it...
View ArticleAnswer by Zoredache for Ansible hostname resolution with ipaddr filter...
The ipv4 filter is not a name resolution filter. It simply tests if the passed string is a valid IPv4 address.If you want to resolve a DNS address you probably should be using the lookup plugin...
View ArticleForce systemd to run ExecStop for failed unit
Is there some way to force systemd to run the ExecStop command for a unit it believes is failed to start?I am running on a Debian 10 system with the buster-backports wireguard package and the default...
View ArticleGrep multiple pattern negative match
So I have a bunch of Apache logs with using the standard log format. I want to get all the log lines that did not come from a web crawler.So lets say I have a file robot_patterns with entries...
View ArticleDescription of kernel.printk values
Between Debian 5 and 6, the default suggested value for kernel.printk in /etc/sysctl.conf was changed from kernel.printk = 4 4 1 7 to kernel.printk = 3 4 1 3. I understand that the first value...
View ArticleWipe last 1MB of a Hard drive
Is there an easy command that I can use to zero out the last 1MB of a hard drive?For the start of the drive I would dd if=/dev/zero of=/dev/sdx bs=1M count=1. The seek option for dd looks promising,...
View ArticleBash flush standard input before a read
Is there an easy way in bash to flush out the standard input?I have a script that is commonly run, and at one point in the script read is used to get input from the user. The problem is that most users...
View ArticleExtract dates from /etc/shadow
The file /etc/shadow has a couple date fields that are expressed as the number of days since Jan 1, 1970. Is there an easy way using to get a list of users and the calendar date of the last password...
View ArticleAnswer by Zoredache for Find source of all installed packages on Debian based...
Been a while since I posted this question. Anyway, a tool was added a couple years back that also would have solved my underling issue, which was to find extra/outdated/foreign packages installed on...
View Article