1, first look at the scriptCat recursive.sh#!/bin/shRead-p "Input path:" FilePathfunction Getallfiles () {For file inls $FilePathDoIf [-f $file]ThenEcho $fileMV $file/bak_file/Elif test-d $fileThenecho "-------------------------------->"CD $fileFilepath=pwdGetallfilesCd..Echo-e "\033[32m[############ $file is a directory .... #######]\033[0m"echo "Elseecho "$FilePath is a invalid path"FiDone}CD $FilePathGetallfiles $FilePath2, test, now say all files
It's OK to change the name directly, and then go back with a reboot.
Method One:Change the Chinese folder to the appropriate English folder, and then modify the configuration file ~/.config/user-dirs.dirsXdg_desktop_dir="$HOME/desktop"Xdg_download_dir="$HOME/downloads"Xdg_templates_dir="$HOME/templates"Xdg_publicshare_dir="$HOME/public"Xdg_documents_dir="$HOME/documents"Xdg_music_dir="$HOME/music"Xdg_pictures_dir="$HOME/pictures"Xdg_videos_dir="$HOME/videos"
Method Two:Enter the comm
Sometimes, the document is very large, a lot of pages, we need to navigate the directory search, on the left side of the chapter directory, to facilitate the reading of documents. The left column shows the chapter directory.
1, the left column has nothing
2, the article is very big, the number of pages. What if there are too many chapter
The examples in this article describe how the go implementation lists directories and traverses directories. Share to everyone for your reference. Specifically as follows:
The Go language gets a list of directories with Ioutil. ReadDir (), traverse directory with filepath. Walk (), use the method lesson to refer to this example.
The specific example code is as follows:
Copy Code code as follows:
Package Main
Import ("FMT""Io/ioutil""O
physical Backup of database directory/var/lib/mysql every 3 days back up the data to the system/opt/dbbak directory#!/bin/bashDay= ' date+%y-%m-%d 'Size= ' Du-sh/var/lib/mysql 'Cd/opt/dbbak 2>/dev/null | | Mkdir/opt/dbbakecho "Date: $DAY" >/opt/dbbak/dbinfo.txtecho "Total Database Size: $SIZE" >>/opt/dbbak/dbinfo.txtTar-zcf/opt/dbbak/mysqlbak-${day}.tgz/var/lib/mysql/opt/dbbak/dbinfo.txt >/dev/nullRm-rf/opt
Tags: ifcfg PNG modified tab type HTTP hosts edit tempOne, proc directory left
Proc/loadavgThe first 0 represents a 1-minute average loadThe second 0 represents a 5-minute average loadThe third 0 represents a 15-minute average load
W 3.uptime 4. Load vs. Core Total When numbers are getting closer to the total number of cores, the more Cards II, etc directory 1. Network adapter Profile View:
In daily operations, we often use rsync as a synchronization artifact. Sometimes when synchronizing two directories, it is required to delete files in the target directory that are more than the source directory, in which case the--delete parameter of rsync can be used to implement this requirement.Like what:Synchronize the/tmp/work directory on Server A to the/t
I. Introduction to the active catalogue
Active Directory (Active Directory) is the component that provides directory services in a Windows Server 2003 domain environment. Directory services are introduced on the Microsoft platform from Windows Server 2000, so we can understand that the Active
Active Directory DeploymentI. Prerequisites1.1) Supported Versions: Windows Server2.2) Specify the computer name of the DC server, host the Ntds.dit database, install the adds service, provide the LDAP query service, provide Kerborse authentication2.3) Prepare IP address, DNS informationThe first DC created by default is the root domain of the first forest, the DNS server, the GC (global catalog server)Two. Deployment processGui:2.1) Add adds role2.2)
Example 1, Lenovo JIAZHIPC Station directory traversal, can read / download arbitrary filesFor example, through the path variable, read The contents of the file below /etc/Example 2, Lenovo report Station directory traversal, can read / download arbitrary filesFor example, by using the variable fileName, download the /etc/passwd fileSubmitted by:Filename=. /.. /.. /.. /.. /.. /.. /.. /etc/passwdDownload,/
Package Io;import java.io.*;p ublic class FileCopy {public static void main (string[] args) throws exception{file Srcdir = n EW File ("Java"); Srcdir.isdirectory () srcdir.exists ()) {throw new Exception ("directory does not Exist");} String[] list,file[] Listfiles method can receive a filenamefilter parameter, the//filenamefilter interface contains an accept (File dir,string name) method,// The method iterates through all subdirectories or files of
If your application uses user-controllable data to access files or directories located in the application server or other back-end file systems in a dangerous way, a path traversal will occur.An attacker could put a path traversal sequence into a file name, back up, to access any file on the server, and a path traversal sequence called "point-point-slash" (.. \)Http://***/go.action?file=. \.. \etc\passwdAvoid filteringThe first is to filter the file name parameter to see if there are any path tr
Recently in the function of doing a file upgrade, you need to specify files from the directory under the download server. After studying zlib, we found that this module could not reach this function.After finding the data found Archiver module is very useful, but I also found that most of the Chinese information is not if the query compression progress, so here to share:Archiver's GitHub Address:Https://github.com/archiverjs/node-archiverAPI Document
Create a virtual directoryOpen apache->conf->httpd.confPaste at the bottomNamevirtualhost 127.0.0.1 DocumentRoot "website Absolute directory" If you build multiple, configure directly ServerName xxx DocumentRoot "XXX" After the configuration is complete, parse it in the host file.You can res
Many people use Kingsoft wps text When do not know how to set up automatic directory, then with small weave together to learn how to operate it, I believe that the society can save a large amount of time in your function.
How does Kingsoft WPS automatically generate a table of contents? WPS automatically generate directory
1, open the toolbar "reference" item
2, click the first item "Insert Table
1, form section:
Copy Code code as follows:
My is Upfile app!!
FileName: Upload file:
2, processing the form page:
Copy Code code as follows:
$mkdir _file_dir = mkdir ('./img/'. $_post[' title '],0777); Get to the title, create a folder under the final directory to hold the category-specified file
$tmp _file_name = $_files[' file ' [' tmp_name '];//Get uploaded temporary file
$file _name = $_fi les['
Unlimited directory replication, webmaster original, although only wrote a few minutes, but it is very useful? $o _path= "admin";//Source Directory$n _path= "n_admin";//New DirectoryClass Copy_path{function Wm_chief_copypath ($o _path, $n _path){$hand =opendir ($o _path);if (!file_exists ($n _path))//The target directory does not exist is established{$this->wm_ch
1, install the FTP service, you can directly yum install VSFTPD.2, set the random start, Chkconfig vsftpd on.3, start the FTP service vsftpd start.4, configure Nginx static resource redirection.Let's say we store a static resource file in our custom directory/usr/local/app/yidoo/ebs-k3c/file/, and we want the request to be forwarded to/usr/local/app/yidoo/when we access www.domain.com/file/*. ebs-k3c/file/, this time Nginx can be configured as follows
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.