Page 2 of 4 FirstFirst 1234 LastLast
Results 16 to 30 of 58
  1. #16
    Joined
    Nov 2001
    Location
    Spokane, Washington
    Age
    49
    Posts
    1,004

    Re: Cool command line stuff

    Here is another good one, if you don't want to babysit a multi-part operation.

    apt-get update && apt-get upgrade

    That line will do the update, then if the update suceeds, it will upgrade.

    If you wanted to perform an operation if the first one failed, you would replace the && with ||....

    apt-get update || apt-get upgrade

    I like piping!

    Athlon XP 2100
    Asus A7V266-E
    512Mb Crucial PC2100
    IBM 60GB 7200rpm HD
    OEM DVD Burner
    PNY GeForce4 MX 64mb
    Lian Li case
    CentOS 4.4
    (AKA Idahopackersfan2, Woody, Woody1&2)

  2. #17
    Joined
    Mar 2002
    Posts
    356

    Re: Cool command line stuff

    for i in www.yahoo.com www.google.com www.nowhere.com; do curl $i; done

  3. #18
    Joined
    Oct 2001
    Location
    Southern Ontario
    Age
    45
    Posts
    13,194

    Re: Cool command line stuff

    Find is ultimate!

    I use that so much I didn't even think of posting it. It's extremely useful!

  4. #19
    Joined
    Oct 2001
    Location
    Southern Ontario
    Age
    45
    Posts
    13,194

    Re: Cool command line stuff

    Here's a neet command I just found tonight:
    Code:
    tar zc YOUR_FILES | ssh USERNAME@HOSTNAME "buffer -o /home/USERNAME/FILENAME"
    This will create tar file called FILENAME of YOUR_FILES and send them over the network (or even the internet) to the computer called HOSTNAME via USERNAME's account. The transaction will be secured with ssh's encription so others should not be able to read the data you are sending.

    You may have to install the application buffer as it is not installed by default on most distros.

    Pretty cool I think!
    Last edited by Spankin Partier; 01-18-2007 at 12:16 AM.

  5. #20
    Joined
    Jul 2001
    Location
    UK
    Age
    51
    Posts
    20,229

    Re: Cool command line stuff

    Quote Originally Posted by Woody1&2 View Post
    Here is another good one, if you don't want to babysit a multi-part operation.

    apt-get update && apt-get upgrade

    That line will do the update, then if the update suceeds, it will upgrade.

    If you wanted to perform an operation if the first one failed, you would replace the && with ||....

    apt-get update || apt-get upgrade

    I like piping!
    and a similar principles apply to redirecting output:

    For example, we can use cat to display the contents of a text file, pipe it through grep to search for lines containing a given string and redirect the output to a file:

    Code:
    cat mytextfile | grep sometext > output.txt
    and to append output to an existing file, we use the same principle Woody mentions above of using 2 operators:

    Code:
    cat mytextfile | grep sometext >> output.txt

  6. #21
    Joined
    Jul 2001
    Location
    UK
    Age
    51
    Posts
    20,229

    Re: Cool command line stuff

    Here's another example of the power of piping the output of one command into another, and also introduces some new commands (awk, sort and uniq).

    My website was recently the subject of a DDoS attack, so I wanted to process my logs to find the culprits. However, the logfile is HUGE (nearly 1GB per day) so opening it in a GUI-based text editor isn't really practical.

    So, first lets take a quick peak to see the general format:

    Code:
    $ head log-08-01-2007
    62.108.26.209 - - [08/Jan/2007:10:19:59 +0000] "GET /mirror/gmer/gmer.htm HTTP/1.1" 200 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR1.1.4322)"
    90.18.36.237 - - [08/Jan/2007:10:19:59 +0000] "GET /mirror/gmer/gmer.htm HTTP/1.1" 200 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    88.15.237.180 - - [08/Jan/2007:10:19:59 +0000] "GET /mirror/gmer/gmer.htm HTTP/1.1" 200 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR1.1.4322)"
    82.176.178.166 - - [08/Jan/2007:10:19:59 +0000] "GET /mirror/gmer/gmer.htm HTTP/1.1" 200 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    90.18.36.237 - - [08/Jan/2007:10:19:59 +0000] "GET /mirror/gmer/gmer.htm HTTP/1.1" 200 - "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"
    We can see the IP address is the first field in the logfile.

    I want to grab all the IP addresses that are attacking me, and count the number of instances of each.

    So, first I need to output the file (cat), next I'll filter it for instances of the attacked page using grep. Then I need to grab the IP address from the first field of each line (using awk) and count the number of unique instances (using uniq). However, uniq will only work on adjacent lines, so I'll have to sort them numerically first, and then why not sort them again once they've been counted to put them in numerical order by hits.

    So the final command all piped together is:

    Code:
    $ cat log-08-01-2007 | grep gmer | awk '{print $1}' | sort -bn | uniq -c | sort -rn
     240632 85.117.1.229 
     165746 86.71.248.105 
     151739 88.15.237.180 
     140979 90.18.36.237 
     111577 84.5.141.170 
     111506 87.122.65.122 
      92747 200.207.24.69 
      89181 89.139.30.112 
      86725 82.176.178.166 
      76350 82.78.145.193 
      72689 88.137.85.118 
      63460 84.103.110.196 
      61150 84.74.17.142 
      54688 82.174.132.25 
      53144 84.10.239.25 
      50401 195.23.176.128 
      48934 81.219.221.164 
      45854 213.51.8.164 
      42471 213.190.195.100 
      42051 213.39.172.175 
      41528 87.206.141.229 
      39629 213.93.91.163 
      39377 212.160.111.2 
      34622 88.107.212.14 
      33682 83.26.16.254 
      32985 82.73.217.175 
      31413 81.171.23.182 
      29898 80.3.0.10 
      29541 91.3.15.62 
      29300 80.37.253.69 
      28358 84.84.73.44 
      28151 82.125.85.83 
      27543 213.201.49.19 
      27215 85.71.204.160 
      26641 200.58.147.51 
      25464 83.214.212.138 
      25347 88.162.45.102 
      24977 80.103.203.80 
      24935 88.229.6.52 
      24703 88.137.225.68 
      23191 194.146.248.57 
      23084 66.98.9.247 
      23071 85.71.0.36 
      22784 89.57.152.52 
      22682 70.150.227.194 
      21884 85.178.114.200 
      21811 87.207.10.229 
      19672 201.26.212.188 
      19252 172.142.82.195 
      17938 85.107.35.54 
      17864 24.95.66.16 
      17776 125.60.243.112 
      17019 59.30.228.123 
      16734 80.143.170.165 
      16294 83.7.14.82 
      16188 83.14.179.250 
      16182 88.226.227.239 
      15986 88.23.244.90 
      15432 83.8.77.164 
      15285 125.177.172.30 
      14910 80.172.164.122 
      14730 85.0.16.51 
      14582 85.181.230.178 
      14524 151.49.90.126 
      14451 83.30.173.5 
      14390 80.212.44.106 
      14072 89.171.20.197 
      13777 89.98.171.149 
      13672 212.242.198.45 
      13559 194.9.52.119 
      13452 82.146.242.248 
      13377 62.108.26.209 
      13308 88.2.164.122 
      13272 60.182.68.51 
      12979 88.140.79.142 
      12898 83.238.224.166 
      12787 85.107.171.169 
      12582 82.160.123.2 
      12559 62.235.193.63 
      12532 88.22.79.246 
      12060 88.226.53.102 
      12052 83.31.136.222 
      11888 213.156.55.137 
      11728 201.235.143.69 
      11678 141.109.108.254 
      11394 61.11.103.146 
      11234 83.17.70.230 
      10948 75.84.102.189 
      10720 80.63.253.66 
      10466 85.191.35.8 
      10297 61.8.208.99 
      10181 201.47.35.145 
       9947 87.243.131.102 
       9545 89.171.41.116 
       9464 203.144.160.242 
       9399 83.22.61.38 
       9239 85.187.15.155 
       9016 200.111.54.164 
       8887 83.22.251.60 
       8792 83.12.17.34 
       8779 84.160.15.149 
       8779 202.53.9.98 
       8717 82.224.1.15 
       8709 83.8.80.127 
       8704 161.116.72.73 
       8659 87.122.100.3 
       8597 213.140.18.141 
       8443 213.46.39.54 
       8395 85.97.48.249 
       8234 144.132.82.162 
       8217 89.78.81.198 
       8152 84.190.96.191 
       8102 61.91.191.10 
       8017 83.9.27.177 
       8001 84.144.24.57 
       7930 58.234.159.216 
       7816 195.80.182.183 
       7688 212.182.131.205 
       7564 60.254.88.163 
       7538 83.31.85.207 
       7525 89.228.244.32 
       7503 71.126.16.86 
       7395 82.78.58.20 
       7389 195.204.124.127 
       7363 83.23.4.254 
       7181 65.80.23.201 
       7110 62.125.89.239 
       7050 89.229.67.210 
       7036 88.74.132.8 
       6983 200.8.4.244 
       6787 85.18.66.16 
       6765 200.193.151.51 
       6759 83.28.243.34 
       6752 86.208.184.128 
       6683 24.128.114.149 
       6485 91.0.124.18 
       6472 217.94.246.98 
       6359 61.11.45.12 
       6349 85.186.91.147 
       6299 211.90.101.5 
       6144 83.15.143.234 
       6136 89.58.17.140 
       6093 165.21.155.11 
       6076 165.21.155.15 
       6063 165.21.155.8 
       6018 88.110.142.79 
       6010 165.21.155.14 
       5999 165.21.155.9 
       5972 165.21.155.13 
       5972 165.21.155.10 
       5969 165.21.155.17 
       5941 165.21.155.16 
       5937 165.21.155.12 
       5935 201.78.241.229 
       5919 86.122.83.6 
       5844 193.77.115.13 
       5814 125.99.132.180 
       5758 88.240.64.241 
       5722 87.169.81.182 
       5714 83.84.135.7 
       5707 88.118.233.23 
       5695 217.173.42.13 
       5670 82.38.124.29 
       5619 82.254.199.135 
       5619 81.14.167.182 
       5543 82.72.82.237 
       5507 24.23.175.118 
       5446 83.198.2.43 
       5336 89.36.212.207 
       5239 88.74.131.209 
       5224 222.123.94.156 
       5220 91.6.18.43 
       5121 83.16.174.232 
       5107 83.135.85.107 
       4983 58.235.38.17 
       4978 86.63.85.224 
       4966 85.50.38.105 
       4948 90.0.215.89 
       4846 125.23.188.48 
       4802 83.2.1.190 
       4795 82.46.6.148 
       4784 85.102.116.147 
       4759 195.13.38.131 
       4754 83.186.143.212 
       4702 83.6.238.21 
       4683 83.13.151.106 
       4664 217.120.168.30 
       4656 89.57.209.214 
       4505 82.254.23.66 
       4492 82.253.94.39 
       4485 201.19.204.212 
       4473 203.144.143.4 
       4452 82.65.184.193 
       4441 88.241.125.191 
       4431 86.135.4.153 
       4418 83.27.49.66 
       4412 83.115.30.67 
       4271 62.65.34.222 
       4221 86.221.21.111 
       4212 84.101.207.123 
       4197 61.42.228.178 
       4183 83.9.41.102 
       4168 62.240.182.20 
       4159 217.235.230.90 
       4105 83.7.160.72 
       4088 192.195.230.9 
       4039 82.83.196.141 
       3993 87.91.103.208 
       3955 84.0.188.63 
       3939 83.13.79.202 
       3932 59.178.85.139 
       3909 145.53.105.206 
       3904 87.206.205.156 
       3875 72.189.218.180 
       3750 216.82.142.72 
       3720 218.77.197.120 
       3650 83.17.69.122 
       3554 89.147.70.32 
       3507 81.190.0.210 
       3408 58.225.42.144 
       3398 84.101.207.64 
       3352 83.31.150.134 
       3345 82.239.179.70 
       3340 87.8.19.97 
       3333 201.81.84.243 
       3330 80.166.147.29 
       3329 68.59.198.157 
       3310 195.132.225.6 
       3304 84.185.150.239 
       3196 87.105.68.247 
       3171 220.247.223.185 
       3160 83.183.203.125 
       3121 62.203.233.129 
       3107 83.27.240.64 
       3039 85.182.73.169 
       3009 83.168.106.13 
       2996 85.102.56.168 
       2970 83.2.20.34 
       2948 82.232.152.2 
       2881 80.218.184.128 
       2866 83.29.154.29 
       2828 81.203.249.28 
       2813 83.27.137.109 
       2806 88.247.171.82 
       2806 83.11.191.124 
       2795 84.223.174.50 
       2770 220.94.200.67 
       2744 82.160.121.131 
       2722 84.142.251.73 
       2722 82.251.248.167 
       2692 82.64.159.28 
       2674 81.208.60.206 
       2640 138.89.223.162 
       2635 87.19.253.203 
       2628 87.74.2.159 
       2616 87.74.34.6 
       2606 89.142.47.110 
       2599 81.249.76.159 
       2562 172.142.228.222 
       2516 80.50.254.70 
       2507 83.113.191.186 
       2486 87.97.91.76 
       2472 83.31.28.224 
       2454 80.235.64.132 
       2362 84.73.27.96 
       2338 84.4.111.146 
       2305 82.149.105.28 
       2273 88.137.120.236 
       2248 219.108.108.222 
       2209 84.0.8.103 
       2199 86.124.101.103 
       2196 84.74.59.245 
       2189 83.31.131.129 
       2128 85.186.48.112 
       2096 88.240.3.120 
       2083 82.147.234.107 
       2076 82.126.67.38 
       2061 71.223.148.131 
       2014 82.232.163.170 
       2007 84.101.2.6 
       2004 80.98.172.36 
       1971 90.1.176.150 
       1917 84.61.173.224 
       1914 201.247.121.92 
       1872 87.69.3.149 
       1842 83.27.73.34 
       1821 89.78.63.163 
       1815 85.187.175.140 
       1813 58.87.6.146 
       1809 83.31.117.68 
       1808 85.108.26.218 
       1792 88.74.33.31 
       1787 83.28.206.142 
       1787 82.74.28.109 
       1787 200.123.165.21 
       1739 125.118.214.52 
       1735 83.142.58.154 
       1696 80.54.191.3 
       1692 83.22.108.194 
       1691 88.22.48.244 
       1683 217.232.90.92 
       1656 12.145.79.34 
       1583 81.183.177.232 
       1576 83.22.203.33 
       1524 71.203.171.251 
       1491 193.95.194.170 
       1458 201.90.66.2 
       1443 60.240.59.166 
       1413 221.166.214.60 
       1406 82.119.114.93 
       1375 85.103.121.250 
       1360 84.156.230.8 
       1352 90.10.89.158 
       1349 83.186.62.147 
       1332 81.213.160.213 
       1310 84.168.215.43 
       1266 83.25.129.109 
       1261 80.53.44.186 
       1254 195.4.112.74 
       1234 87.20.73.144 
       1222 83.27.219.3 
       1213 84.227.204.115 
       1211 24.83.208.170 
       1207 90.5.162.71 
       1182 24.163.136.243 
       1170 87.206.133.113 
       1122 124.156.224.241 
       1111 83.7.150.130 
       1100 200.88.38.173 
       1099 203.194.99.98 
       1085 61.173.230.42 
       1063 83.168.96.38 
       1015 83.78.79.184 
       1007 85.98.15.101 
    <snip>
    Last edited by Ned Slider; 01-18-2007 at 01:17 AM.

  7. #22
    Joined
    Jul 2001
    Location
    UK
    Age
    51
    Posts
    20,229

    Re: Cool command line stuff

    Quote Originally Posted by Spankin Partier View Post
    Hmmm, maybe I should do a reboot....Na!
    Hey Spanky - try 'last reboot'

  8. #23
    Joined
    Oct 2001
    Location
    Southern Ontario
    Age
    45
    Posts
    13,194

    Re: Cool command line stuff

    That's a cool one Ned:

    last reboot
    Code:
    reboot   system boot  2.6.9-gentoo-r4  Mon Nov 28 12:17         (417+23:39) 
    reboot   system boot  2.6.9-gentoo-r4  Tue Nov 22 12:15         (6+05:03)   
    reboot   system boot  2.6.9-gentoo-r4  Sat Nov 19 09:29         (3+07:46)   
    reboot   system boot  2.6.9-gentoo-r4  Sat Nov 19 09:25          (05:09)    
    reboot   system boot  2.6.9-gentoo-r4  Wed Nov  9 12:08         (10+02:21)  
    reboot   system boot  2.6.9-gentoo-r4  Tue Nov  8 02:20         (1+14:48)   
    reboot   system boot  2.6.9-gentoo-r4  Thu Oct 13 03:45         (25+14:08)  
    reboot   system boot  2.6.9-gentoo-r4  Sun Oct  2 13:22         (10+19:25)  
    reboot   system boot  2.6.9-gentoo-r4  Mon Sep 26 13:38         (6+04:38)   
    reboot   system boot  2.6.9-gentoo-r4  Mon Sep 26 13:18          (05:24)    
    reboot   system boot  2.6.9-gentoo-r4  Mon Sep 26 13:07          (05:16)    
    reboot   system boot  2.6.9-gentoo-r4  Tue Jun 14 11:59         (104+00:16) 
    reboot   system boot  2.6.9-gentoo-r4  Tue Jun  7 12:15         (7+04:42)   
    reboot   system boot  2.6.9-gentoo-r4  Wed Apr 20 12:26         (48+04:40)  
    reboot   system boot  2.6.9-gentoo-r4  Mon Apr 18 10:01         (2+06:50)   
    reboot   system boot  2.6.9-gentoo-r4  Sun Apr 10 11:19         (8+03:40)   
    reboot   system boot  2.6.9-gentoo-r4  Mon Mar 14 16:03         (26+23:13)  
    reboot   system boot  2.6.9-gentoo-r4  Wed Feb 23 17:15         (19+03:46)  
    reboot   system boot  2.6.9-gentoo-r4  Wed Feb 23 17:03          (05:09)    
    reboot   system boot  2.6.9-gentoo-r4  Tue Feb 22 18:00         (1+04:02)   
    reboot   system boot  2.6.9-gentoo-r4  Wed Feb 16 15:52         (6+07:03)   
    reboot   system boot  2.6.9-gentoo-r4  Sat Jan  8 20:04         (38+16:56)  
    reboot   system boot  2.6.9-gentoo-r4  Mon Jan  3 21:51         (5+02:48)   
    reboot   system boot  2.6.9-gentoo-r4  Mon Jan  3 01:23         (1+01:25)   
    reboot   system boot  2.6.9-gentoo-r4  Sun Jan  2 17:25          (08:38)    
    reboot   system boot  2.6.9-gentoo-r4  Sun Jan  2 17:20          (05:03)    
    reboot   system boot  2.6.9-gentoo-r4  Sun Jan  2 16:11          (06:08)    
    reboot   system boot  2.6.9-gentoo-r4  Sun Jan  2 16:00          (05:09)    
    reboot   system boot  2.6.9-gentoo-r4  Fri Dec 31 21:33         (1+22:31)   
    reboot   system boot  2.6.9-gentoo-r4  Mon Dec 20 00:29         (12+00:23)  
    reboot   system boot  2.6.9-gentoo-r4  Sat Dec 11 13:17         (8+16:09)   
    reboot   system boot  2.6.9-gentoo-r4  Thu Dec  9 21:44         (1+20:26)   
    reboot   system boot  2.6.9-gentoo-r4  Sat Dec  4 16:32         (5+10:09)   
    reboot   system boot  2.6.9-gentoo-r4  Sat Dec  4 16:17          (05:13)    
    reboot   system boot  2.6.9-gentoo-r4  Sat Dec  4 15:41          (05:34)    
    reboot   system boot  2.6.9-gentoo-r4  Sat Dec  4 15:33          (05:06)    
    reboot   system boot  2.6.9-gentoo-r4  Sat Dec  4 15:23          (05:08)    
    reboot   system boot  2.6.9-gentoo-r4  Sat Dec  4 00:09          (20:12)    
    reboot   system boot  2.6.9-gentoo-r4  Sat Dec  4 00:00          (05:07)    
    reboot   system boot  2.6.9-gentoo-r4  Thu Dec  2 22:57         (1+06:01)   
    
    wtmp begins Thu Dec  2 22:57:47 2004
    Looks like I installed Gentoo back in Dec 2004. I can't believe it's been two years already.

  9. #24
    Joined
    Jul 2001
    Location
    UK
    Age
    51
    Posts
    20,229

    Re: Cool command line stuff

    Quote Originally Posted by Spankin Partier View Post
    That's a cool one Ned:
    Yes, gives a nice system history, doesn't it

    I didn't want to post mine as it's too embarrassing - our power here isn't very stable and my UPS battery is almost dead

  10. #25
    Joined
    Oct 2001
    Location
    Southern Ontario
    Age
    45
    Posts
    13,194

    Re: Cool command line stuff

    I started to build the system in my basement at home. It was the first Gentoo system I built. It went so well I decided to keep it. Installed it into our network after Christmas (Jan or Feb). Then I continued to tweek it for a while after that (a few kernel mods).

    I started to get it running the way I wanted, then I had a SCSI drive fail in our RAID array (Sep 25 reboot). I guess I didn't need to reboot it as it's a hot swapable system but I didn't trust it. I guess I wasn't too concerned about uptime after that as I did several reboots in the following two months.

    Now I'm just waiting for the next reboot so I can upgrade the kernel. I'm still running a 2.4 kernel which is no longer being supported by Gentoo. I probably should upgrade it. I just hat messing with stuff that's actually working.
    Last edited by Spankin Partier; 01-21-2007 at 01:11 PM.

  11. #26
    Joined
    Dec 2001
    Location
    Lodoss, the cursed island
    Posts
    3,524

    Re: Cool command line stuff

    ps -e -o cpu,pcpu,rss,arg

    This will produce a list of processes running on your machine with their cpu/mem usage and arguments applied. You can also pipe the command with grep to view a specific process.

    Marmo:
    Ci5 4690K + Gigabyte GA-Z97X-UD5H + 2x8GB Corsair 1600 C9 + Palit GTX980 SJ + 256GB(SSD)/1TB(HDD) running Win7 Pro x64.

    Kanon (wife's PC):
    Ci5 6600K + Gigabyte GA-Z270X-Gaming 5 + 2x8GB Corsair 2666 C16 + MSI GTX1080 G+X 11Gbps + 256GB(SSD)/1TB(HDD) running Win8.1 Pro x64.

    Alania:
    Dell Vostro 3460: Ci7 3632QM + HM77 + 6GB DDR3-1600 + Nvidia GT630M + 480GB SSD running Win7 Pro x64.

    Moss (Windows Hyper-V RemoteFX server):
    Ci5 6600K + Asus Maximum VIII HERO + 2x8GB Corsair 2666 C16 + MSI GTX660 TF + 2x2TB (RAID1) HDDs running Win2012 R2 Std. x64.

    Flame (Linux server / F@H):
    PIIX4 925 + ASRock 890FX Deluxe5 + 2x4GB Corsair 1833 C9 + Sapphire HD5750 1GB + 2x250GB(System RAID1)/3x500GB(3ware 9650SE-4LPML RAID5) HDDs running CentOS 6.7 x64.

    Valis:
    C2Q Q9650 + Asus P5Q3 Dlx. + 2x4GB Corsair 1600 C8 + EVGA GTX560 Ti SC + 2x74GB/500GB HDDs running Fedora 21 x64.



  12. #27
    Joined
    Dec 2003
    Location
    Orlando, FL
    Age
    40
    Posts
    3,062

    Re: Cool command line stuff

    One of the best threads to come along in some time! I love the "cal" command!
    ./

  13. #28
    Joined
    May 2001
    Location
    MA
    Posts
    927

    Re: Cool command line stuff

    I love uname -r

    and of course mount

    ifconfig to see network settings

  14. #29
    Joined
    Mar 2002
    Posts
    356

    Re: Cool command line stuff

    Yea. ifconfig is pretty neat. I was shocked to learn that when a coworker unplugged the ethernet cable to my windows nt 4 box I had to REBOOT to establish network connectivity. Not sure windows xp is much better (haven't bothered to figure out if htere is a soft command to re-enable network without reboot).

  15. #30
    Joined
    Nov 2001
    Location
    Spokane, Washington
    Age
    49
    Posts
    1,004

    Re: Cool command line stuff

    Quote Originally Posted by you View Post
    Yea. ifconfig is pretty neat. I was shocked to learn that when a coworker unplugged the ethernet cable to my windows nt 4 box I had to REBOOT to establish network connectivity. Not sure windows xp is much better (haven't bothered to figure out if htere is a soft command to re-enable network without reboot).
    ifdown <device name>, then ifup <device name>

    take it down, then bring it back up. Another way to avoid a re-boot!

    Athlon XP 2100
    Asus A7V266-E
    512Mb Crucial PC2100
    IBM 60GB 7200rpm HD
    OEM DVD Burner
    PNY GeForce4 MX 64mb
    Lian Li case
    CentOS 4.4
    (AKA Idahopackersfan2, Woody, Woody1&2)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •