本文转自鸟窝 获取 goroutineID package main import ( "fmt" "runtime" "strconv" "strings" "sync" ) func GoID() int { var buf [64]byte n := runtime.Stack(buf[:], ...
分类:
其他好文 时间:
2020-12-21 11:47:58
阅读次数:
0
在Linux中使用Shell写一个显示目录结构的命令,快速寻找目录结构。 1、代码 #!/usr/bin/env bash # 本命令用于显示指定路径或者当前路径的文件结构,支持搜索 # tf 显示当前目录的文件结构 # tf 接关键词 搜索当前目录 # tf 目录 关键词 搜索指定目录 # 本命令 ...
分类:
系统相关 时间:
2020-12-21 11:34:00
阅读次数:
0
#include<stdio.h>intmain(){inta=0;intb=0;intc=0;scanf("%d%d%d",&a,&b,&c);if(a<b){inttmp=a;a=b;b=tmp;}if(a<c){inttmp=a;a=c;c=tmp;}if(b<c){inttmp=b;b=c;c=tmp;}printf
分类:
其他好文 时间:
2020-12-21 11:13:40
阅读次数:
0
#include<stdio.h>intmain(){intm=24;intn=18;intr=0;while(m%n){r=m%n;m=n;n=r;}printf("%d\n",n);return0;}
分类:
其他好文 时间:
2020-12-21 11:13:24
阅读次数:
0
//打印闰年#include<stdio.h>intmain(){intyear=0;intcount=0;for(year=1000;year<=2000;year++){if(year%4==0&&year%100!=0){printf("%d",year);count++;}elseif(year%400==0){printf("%d",year);coun
分类:
其他好文 时间:
2020-12-21 11:12:56
阅读次数:
0
//打印闰年#include<stdio.h>intmain(){intyear=0;intcount=0;for(year=1000;year<=2000;year++){if(year%4==0&&year%100!=0){printf("%d",year);count++;}elseif(year%400==0){printf("%d",year);coun
分类:
其他好文 时间:
2020-12-21 11:12:41
阅读次数:
0
源程序: #include <stdio.h>#include <string.h> int main(){ char str[20]; int length; length=strlen(strcpy(str,"Hello World!")); printf("字符串长度:%d\n",length ...
分类:
编程语言 时间:
2020-12-19 12:52:11
阅读次数:
5
1.查看系统信息 lsb_release -a #cat /proc/version No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.7 LTS Release: 16.04 Codenam ...
分类:
系统相关 时间:
2020-12-19 12:51:55
阅读次数:
5
所有进程的祖宗进程,就是系统启动时的 init进程。init进程会启动很多daemon进程,为系统运行提供服务。然后启动getty,让用户登录,登录后运行shell。 ...
分类:
系统相关 时间:
2020-12-19 12:44:50
阅读次数:
3
1、显示统计占用系统内存最多的进程,并排序。ps-eopid,ppid,cmd,%mem--sort=-%mem2、编写脚本,使用for和while分别实现192.168.0.0/24网段内,地址是否能够ping通,若ping通则输出"success!",若ping不通则输出"fail!"#for循环版本1#!/bin/bashNET=192.168.0fo
分类:
系统相关 时间:
2020-12-18 13:10:27
阅读次数:
4