最新动态

今日:0  |  文章:1152
汇集全站版块最新文章
admin
小绿叶技术博客 Lv2 超级管理员

linux 特殊文件属性

Linux 文件特殊属性 SUID 问题 导出 rootfs 的时候,出现一个问题,sudo 出现权限错误 /usr/bin/sudo must be owned by uid 0 and have the setuid bit set。 定位 查看这个文件的属性,会看到 sudo 属性缺少了 SUID,而一个正常的 sudo 文件应该的权限如下: ls -l /usr/bin/sudo # -rwsr-xr-x 1 root root 166056 Jan 19 2021 /usr/bin/sud
 
linux   1562   2023-02-13
admin
小绿叶技术博客 Lv2 超级管理员

功能:shell 自动导出数据库,将导出的格式为 : 数据库名+时间.sql

#!/bin/bash # databases out save # developer : eisc.cn # 开发: 小绿叶技术博客; 功能:shell 自动导出数据库,将导出的格式为 : 数据库名+时间.sql echo "linux user: $USER ; Enter the current user sudo password: " ; sudo date ; formatdate=`date +%Y.%m.%d-%H%M%S` ; echo "time year month day H
 
自动化运维linux   2328   2023-02-08
admin
小绿叶技术博客 Lv2 超级管理员

c++ 文件操作大全,增删改查

/******************************************************** Copyright (C), 2016-2018, FileName: main Author: woniu201 Created: 2018/08/31 Description: 文件操作:读取指定行,删除指定行,修改指定行 ********************************************************/ #include <iostr
 
C/C++语言开发   1288   2023-01-31
admin
小绿叶技术博客 Lv2 超级管理员

在指定位置插入字符串 c++

#include <stdio.h> #include <string.h> int main(int argc, const char *argv[]) { char dest[30] = "12345"; char str[] = "abc"; int n,i=0,j=0; printf("请输入插入位置>>>"); scanf("%d",&n); for(i=5;i>=n;i--){ dest[i+3]=dest[i]; }
 
C/C++语言开发   1245   2023-01-31
admin
小绿叶技术博客 Lv2 超级管理员

c++ 文件读写

#include <iostream> #include <cstring> #include <string> #include <stdlib.h> // system 命令使用头文件 #include <fstream> // 读写文件 /*------ mkdir 命令 ------*/ #include <sys/stat.h> #include <
 
C/C++语言开发   1914   2023-01-31
admin
小绿叶技术博客 Lv2 超级管理员

读写文件 c++ ofstream ifstream

#include <iostream> #include <cstring> #include <string> #include <stdlib.h> // system 命令使用头文件 #include <fstream> // 读写文件 /*------ mkdir 命令 ------*/ #include <sys/stat.h> #include <
 
c++ web 编程   2297   2023-01-29
admin
小绿叶技术博客 Lv2 超级管理员

Linux c++ 创建目录

#include <sys/stat.h>   #include <sys/types.h> #include <cstddef> #include <string.h> #include <stdio.h> void mkdir_path(char *p_cMkdir); int main() { char path[60]="/home/salman/30"; mkdir_path(path); } void mkdir_
 
C/C++语言开发   1379   2023-01-29
admin
小绿叶技术博客 Lv2 超级管理员

ubuntu kvm winpe 使用 引导修复 重置windows 密码 windows qocw2 镜像

#  qcow2 救援,winpe 1. 下载微pe: https://www.wepe.com.cn/download.html2. 打开微pe -> 生成可启动 ios  (光盘图标) -> 拷贝 winpe.iso 3. kvm 虚拟机 ->  文件 -> 新建虚拟机 -> 本地安装介质 iso -> 选择 iso  (winpe.iso) -> 选择要安装的操作系统: (winpe 2x
 
KVM虚拟化   1794   2023-01-27
admin
小绿叶技术博客 Lv2 超级管理员

ubuntu 开启远程桌面, 桌面合盖不休眠

#--- 开启远程桌面 ---#sudo apt install -y xrdp# 方法一安装 xrdp 远程工具,缺点: 图像延迟#方法二: 缺点:锁屏下无法登陆设置 > 共享 > 远程桌面 > 开启远程桌面 和 远程控制, 认证 设置密码设置 > 共享 > 远程登陆 > 开启#--- 合盖不休眠 ---# NR=`cat -n /etc/systemd/logind.conf | grep -w HandleLidSwitch | awk -F" " '{
 
ubuntu   2801   2023-01-26
admin
小绿叶技术博客 Lv2 超级管理员

c 结构体 指针

#include <stdio.h> struct namebiao{ char *name; //姓名 int num; //学号 int age; //年龄 char group; //所在小组 float score; //成绩 }; // 定义一个结构体 自定义名字 namebiao struct namebiao shuzu[]= { {"Li ping", 5, 18, 'C', 145.0}, {"Zhang
 
C/C++语言开发   1121   2023-01-17
头像

用户名:

粉丝数:

签名:

资料 关注 好友 消息