<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.kitsnet.us/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=192.168.15.53</id>
	<title>KitsNet - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.kitsnet.us/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=192.168.15.53"/>
	<link rel="alternate" type="text/html" href="https://wiki.kitsnet.us/wiki/Special:Contributions/192.168.15.53"/>
	<updated>2026-10-07T06:07:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.kitsnet.us/w/index.php?title=Linux:Tips_and_Tricks&amp;diff=681</id>
		<title>Linux:Tips and Tricks</title>
		<link rel="alternate" type="text/html" href="https://wiki.kitsnet.us/w/index.php?title=Linux:Tips_and_Tricks&amp;diff=681"/>
		<updated>2022-12-30T19:03:17Z</updated>

		<summary type="html">&lt;p&gt;192.168.15.53: /* Find files modified in past N days */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;===== Find files modified in past N days =====&lt;br /&gt;
&amp;lt;code&amp;gt;find &#039;&#039;path&#039;&#039; -mtime -&#039;&#039;N&#039;&#039; -ls&amp;lt;/code&amp;gt;&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
[psmode@wort ~]$ find /kvm/ -mtime -3 -ls&lt;br /&gt;
102090127      4 drwxr-xr-x   7  root     root         4096 Jan  3 09:46 /kvm/&lt;br /&gt;
  2038539      4 drwxr-xr-x   2  root     kitsnet_adm     4096 Jan  3 09:13 /kvm/socat-kvm&lt;br /&gt;
  2038573      4 -rw-r--r--   1  root     root               5 Jan  3 09:13 /kvm/socat-kvm/uv040&lt;br /&gt;
101237691      8 -rw-r--r--   1  root     kitsnet_adm     6370 Jan  3 09:46 /kvm/uv034.xml&lt;br /&gt;
102163845     12 -rw-r--r--   1  root     root            9096 Jan  3 09:46 /kvm/uv039.xml&lt;br /&gt;
102090129     12 -rw-r--r--   1  root     root            8303 Jan  3 09:46 /kvm/uv040.xml&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Shell script debugging modes =====&lt;br /&gt;
A good explanation of the debugging modes is given by [https://www.tecmint.com/enable-shell-debug-mode-linux/ How To Enable Shell Script Debugging Mode in Linux]. Basically, there are three modes&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;-v&amp;lt;/code&amp;gt; (short for verbose) – tells the shell to show all lines in a script while they are read, it activates verbose mode.&lt;br /&gt;
* &amp;lt;code&amp;gt;-n&amp;lt;/code&amp;gt; (short for noexec or no ecxecution) – instructs the shell read all the commands, however doesn’t execute them. This options activates syntax checking mode.&lt;br /&gt;
* &amp;lt;code&amp;gt;-x&amp;lt;/code&amp;gt; (short for xtrace or execution trace) – tells the shell to display all commands and their arguments on the terminal while they are executed. This option enables shell tracing mode.&lt;br /&gt;
&lt;br /&gt;
Which may be invoked by any of three different ways:&lt;br /&gt;
&lt;br /&gt;
# Modifying the first line of a shell script: &amp;lt;code&amp;gt;#!/bin/sh &#039;&#039;option(s)&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
# Invoking shell with debugging options: &amp;lt;code&amp;gt;$ /bin/bash &#039;&#039;option(s)&#039;&#039; &#039;&#039;script_name&#039;&#039; &#039;&#039;argument1 ... argumentN&#039;&#039;&amp;lt;/code&amp;gt;   &lt;br /&gt;
# Using set shell built-in command in the middle of the script: &amp;lt;code&amp;gt;$ set -&#039;&#039;option&#039;&#039;&amp;lt;/code&amp;gt; to enable or &amp;lt;code&amp;gt;$ set +&#039;&#039;option&#039;&#039;&amp;lt;/code&amp;gt; to disable&lt;br /&gt;
&lt;br /&gt;
==== Network Diagnostics ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell-session&amp;quot;&amp;gt;&lt;br /&gt;
# ip a&lt;br /&gt;
# ip l&lt;br /&gt;
# ip r&lt;br /&gt;
# ip -6 r&lt;br /&gt;
# firewall-cmd --list-all --zone=... (replace ... with whatever zones you are working with)&lt;br /&gt;
# nmcli c s&lt;br /&gt;
# nmcli d s&lt;br /&gt;
# nmcli c s ppp0&lt;br /&gt;
# nmcli c s enp2s0&lt;br /&gt;
# nmcli c s enp3s0&lt;br /&gt;
# sysctl -a | grep -E &#039;forwarding&#039;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>192.168.15.53</name></author>
	</entry>
</feed>