All pastes #918550 Raw Edit

Something

public text v1 · immutable
#918550 ·published 2008-02-26 04:59 UTC
rendered paste body


1) find /etc/ -type f -exec grep "tcp" {} \;
  To find how many lines there are follow up with a |wc -l

2) du -ks /var/*|sort -n
  cache at this moment is the largest directory in my /var

3) tar -cf /tmp/usr/bin/bin.tar /usr/bin/

4) touch /etc/passwd -r /etc/group

6) find /tmp/* -mtime +20 -exec rm -rf {} \; 2>/dev/null 1>&2

7) 0  1  * * 6  root    find /tmp/* -mtime +30 -exec rm -rf {} \; 2>/dev/null 1>&2

8) They display the kernel diagnostic information, dmesg only displays relevant/limited information.

9) Displays the kernel routing tables with numeric addresses (ips instead of hostnames)

10) ifconfig -a lists the status of the currently active network interfaces; netstat simply showed the routing information

11) /etc/resolv.conf

12) run "hostname"

13) You couldn't resolve the DNS information when you had no nameserver information in resolv.conf. You could still ping it by IP however since that doesn't use domain name translations.

14) /etc/services
FTP = 21TCP
ftp-data 20TCP
DNS 53TCP/UDP

15) 
6 TCP         Transmission Control
17 UDP         User Datagram
2 ICMP        Internet Control Message   
3 IGMP        Internet Group Management

16) tar -cf home-ftp.tar /home/ftp
Copy it over to new system.
I'd also make sure that the users on the new systems had the same UIDs/GIDs as on the previous (/etc/passwd)