Actions

Difference between revisions of "Linux"

From ACL@NCU

Line 20: Line 20:
</font size>
</font size>


= python =
= Network Connection =
 
= Firewall =
*Blocking a port [https://help.ubuntu.com/10.04/serverguide/firewall.html]
*Blocking a port [https://help.ubuntu.com/10.04/serverguide/firewall.html]
<pre>
<pre>
sudo ufw deny 80
sudo ufw deny 80
</pre>
</pre>
*Scanning available ports
<pre>
nmap -PS <IP address>
</pre>
*Scanning all available IPs in subnet
<pre>
nmap -sP 192.168.1.0/24
</pre>
</font size>
</font size>

Revision as of 01:24, 20 January 2013

Useful tcsh and python commands

tcsh

  • Find files

with defined stem pattern under multiple different folder

find */*/*anat+tlrc.*

find files with a suffix recursively under subdirectories

find . -name \*.mgz -print

delete or copy filenames from a "pattern" search

rm `find */*/*anat+tlrc.*`

Network Connection

  • Blocking a port [1]
sudo ufw deny 80
  • Scanning available ports
nmap -PS <IP address>
  • Scanning all available IPs in subnet
nmap -sP 192.168.1.0/24