↧
Comment by Zoredache on Why does default bash seem to not have some of the...
Bash saves the history to a file, when it exits. If it gets killed, it doesn't save the history. If you recently restarted, maybe things didn't exit properly.
View ArticleComment by Zoredache on Dnsmasq makes ping start slowly
If options single-request makes it go away, are you sure that one of the servers you are pointing at wasn't broken?
View ArticleComment by Zoredache on Is it normal for a debian server to have used 191GB...
The output of du -x --max-depth=1 -h / would probably be more useful. It would give you a hint to where the usage is located.
View ArticleComment by Zoredache on Is it normal for a debian server to have used 191GB...
ext does this partly because of issues related to fragmentation when the filesystem becomes full, and to protect you from non-root services completely filling your drive and crashing the system. You...
View ArticleComment by Zoredache on Can you make the `dd` command safe?
There is no way to prevent people from screwing things up. Don't give user access to login as root, and don't put them in the 'disk' group? Just have good backup system so you can recover things when...
View ArticleComment by Zoredache on Naming convention standard for Ethernet and Wi-Fi...
Is there a reason why you wouldn't look at something like lshw? Specifically inspect the contents of lshw -class network maybe? Look for everything that is capabilities: ethernet physical? Possibly...
View ArticleComment by Zoredache on Run rsync only if target directory exists?
If you don't mind it erroring out you can do something like rsync /src/. /target/. The trailing /. on the path will cause it to error out if the directory doesn't exist.
View ArticleComment by Zoredache on How to upgrade one single package and all its...
That should already be happening if you do apt-get install curl. At least if it is dependency information is correct in the package.
View ArticleComment by Zoredache on USB drive says it's full but it is not
Are all the files in a single directory? Don't remember the exact details but FAT has a smallish limit to the number of items that can be in a single directory.
View ArticleComment by Zoredache on Ansible adhoc command
Is the group 'hosts' in your inventory? Do you have hosts defined? Keep in mind that the 'command' module is not going to work, you must use the shell for your command since you have a | pipe..
View ArticleComment by Zoredache on how to ping & use specific network card
@lapo thanks, if you look at the history of this answer my comment was years before the update mentioning BSD. Also the comment from the original poster of the question is from person using the GNU...
View ArticleComment by Zoredache on I don't understand how "ls" command works
A directory is not the sum of its children, it is basically a table of references to location of its children.
View ArticleAnswer by Zoredache for What are the pros and cons to editing iptables...
Most people with this situation handle it with some abstraction.For example. Instead of having a single file with your rule set, why not build a set of files with your rules and concatenate them...
View ArticleIterate over the output of a command in bash without a subshell
I want to loop over the output of a command without creating a sub-shell or using a temporary file.The initial version of of my script looked like this, but this doesn't work since it creates a...
View ArticleAnswer by Zoredache for Delete files specified by the output of find: rm...
Well I would be tempted to do something like this instead, making the entire operation a single command.find /home/domain/imap/domain.com/ -mtime +190 \ \( -ipath '*/Maildir/new/*' -o -ipath...
View ArticleAnswer by Zoredache for ssh to a new user in ubuntu
How did you create the account? Looks like you did something unusual instead of using adduser username. I would guess that the home directory didn't get created properly, or /etc/skel didn't get copied...
View ArticleAnswer by Zoredache for How do I match a string with symbols in a grep-kind...
Use single quotes (') so $nnn isn't treated as a variable. Strings with " are interpolated strings, with a ' no interpolation happens.Heck just just look at the output when you prefeace that string...
View ArticleAnswer by Zoredache for How do I perform xargs grep on grep output that has...
Use something like this perhaps (if gnu grep).grep -r 'content pattern' --include==*.cppman grep--include=GLOB Search only files whose base name matches GLOB (using wildcard matching as described under...
View ArticleAnswer by Zoredache for Can administrating task of 'root' be divided to the...
The simple fact is that if a person can arbitrarily install programs then they probably can install a program that will run under root privileges, so they could install programs that would grant them...
View ArticleAnswer by Zoredache for Installing latest libcurl on debian from source
apt-get install libcurl-dev gives me an error: E: Package 'libcurl-dev' has no installation candidateWhat do you really need? It looks like the packages were renamed. And you get different dev packages...
View ArticleAnswer 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 ArticleFind source of all installed packages on Debian based systems
I am trying to find a good method to find the repository for each package that was stored on my system that can be easily parsed.Backstory:I have Debian wheezy systems and have setup the...
View Article
More Pages to Explore .....