How can I tell if there are no regular files in Bash?
I use the following script to see if the file exists:
#!/bin/bash
FILE=$1
if [ -f $FILE ]; then
echo "File $FILE exists."
else
echo "File $FILE does not exist."
fi
If I just want to check that the file does not exist, what is the correct syntax to use?
#!/bin/bash
FILE=$1
if [ $FILE does not exist ]; then
echo "File ...
Posted by maheshbaba on Tue, 03 Dec 2019 19:24:56 +0100
c + + project configuration of vscode under linux
Get ready
install vscode , you can download the deb package directly for installation, install the C/C++ for Visual Studio Code plug-in after completion, and restart after installation (no need to restart after the latest version 1.3).
Generate directories and files
Create a new folder [test] and a new file helloworld.cpp. The contents of the f ...
Posted by asterinex on Mon, 02 Dec 2019 03:01:49 +0100
K8S upgrade V1.14.0
1. View the container image version of this version:
kubeadm config images list The output is as follows:
~# kubeadm config images list
k8s.gcr.io/kube-apiserver:v1.14.0
k8s.gcr.io/kube-controller-manager:v1.14.0
k8s.gcr.io/kube-scheduler:v1.14.0
k8s.gcr.io/kube-proxy:v1.14.0
k8s.gcr.io/pause:3.1
k8s.gcr.io/etcd:3.3.10
k8s.gcr.io/coredns:1.3.1 ...
Posted by rishiraj on Sat, 30 Nov 2019 21:40:51 +0100
Two methods of adding system call under Linux(Ubuntu) (kernel compilation method module addition)
It is really too pit, really want to Tucao about this operation system practice, each time is compile the kernel. The textbook was written in 2009, all the code before kernel 3.3.
I record the system call experiment, hope you can avoid stepping on the pit.
Method 1: kernel compilation
Here I give you a link. This blog is wel ...
Posted by derrick1123 on Sat, 30 Nov 2019 12:19:12 +0100
linux and Windows Process Control
Process Management Control
What is implemented here is a custom timer that counts the time a child process runs.The main ways of use are
timer [-t seconds] command arguments
For example, to count the run time of ls, you can enter timers directly, followed by arguments, which are the parameters of the program you want to run.For example: timer l ...
Posted by growler123 on Thu, 21 Nov 2019 22:32:25 +0100
Ten common simplified versions of Go algorithm
Recently, I have time to watch Go. I feel that the language of Go is really good. I'm Baidu. Let's talk about the algorithm today
What is algorithm
A series of calculation steps used to convert input data into output results
The significance of the algorithm
Used to solve specific problems
The efficiency of different algorithms to ...
Posted by kobayashi_one on Thu, 21 Nov 2019 15:45:22 +0100
payload season 9 recurrence for liangshen based on white list Regsvr32
0x00 Regsvr32 introduction:
The Regsvr32 command is used to register COM components. It is a command provided by Windows system to register or uninstall controls with the system, and runs in command line mode. Regsvr32.exe of WinXP and above system is under windows\system32 folder; regsvr32.exe of 2000 system is under winnt\sy ...
Posted by okuto1973 on Mon, 18 Nov 2019 17:15:37 +0100
Asible Learning Notes--Common Modules
Ansible Common Modules
Modules included in this section:
(1) Timing task module cronvar
(2) archive module
(3) Unpacking module unarchive
(4) Download module get_url
(5) wait_for module
(6) script module
Timed Task Module cronvar
In addition to the cron module itself, which can manage cron's environment variables, another module, cronvar, can ...
Posted by jharbin on Sun, 17 Nov 2019 05:15:50 +0100
python base (30): other methods of sticking, socket s
1. Sticky
1.1 sticking phenomenon
Let's start by making a program that executes commands remotely based on tcp (commands ls-l; l l l l l; pwd)
When multiple commands are executed at the same time, it is likely that only part of the result will be obtained, and when other commands are executed, another part of the result will be received, which ...
Posted by justice1 on Sat, 16 Nov 2019 10:44:02 +0100
Docker use - two hours to get started
Welcome to the original link: https://mp.weixin.qq.com/s/eAJpnEfjflVr76iPVHN6rA
This is a personal note of sorting and thinking after watching the above links
Advantages of docker container
More efficient use of system resources
Because the container does not need additional overhead such as hardware virtualization and runni ...
Posted by nosher on Sat, 09 Nov 2019 12:52:47 +0100