directory

Folder to dump windows service log files

ε祈祈猫儿з 提交于 2020-03-06 09:18:11
问题 Short: What's the most appropriate folder for windows service to dump log files into? Details I have a windows service that produces log files that a low-tech end user might be interested to look at (actual communication between a computer and a manufacturing line monitoring sensors). The computer is a stand-alone dedicated computer that acts as a data acquisition server, it has monitor and accessible to the end user, but not meant to be touched unless there are problems. What's the best

nginx故障排錯

心不动则不痛 提交于 2020-03-06 05:22:01
nginx:[emerg]getpwnam(“nginx”)failed 解决 :useradd nginx -s /sbin/nologin -M make 时报错 解决 :yum install -y gcc-gcc++ make apache服务Forbidden 403问题精彩总结 原因 1:apache配置文件中没有对站点目录的权限许可,这通常是在初始安装apache后,更改了默认的apache站点目录时所至(重要,常发生): 如将站点目录更改为: /var/blog,则在apache配置文件中如果不加下面的配置 就会返回403错误。 <Directory "/var/blog"> Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all </Directory> 提示:生产环境上面的配置还需修改 ,见下文 。 原因 2:站点目录下无首页文件(index文件),而apache的配置又禁止了目录浏览,就会提示403错误,配置如下(偶尔发生): a.站点目录下无首页文件(index文件): [root@http-server blog]# pwd /var/blog [root@http-server blog]# ll total 12 drwxr-xr-x 2

Windows 命令行

▼魔方 西西 提交于 2020-03-05 22:05:10
1、d:                进入d盘 2、dir(directory)           显示当前文件夹下的所有内容 3、md (make directory) +文件夹名   在当前文件夹下创建文件夹 4、rd (remove directory)+文件夹名   删除文件夹 5、del+文件名(需要后缀)      删除文件 6、cd (change directory)       进入指定目录(文件夹下) 7、cd..                返回到上一级目录 8、cd\               退回到盘符所在的根目录 9、del+*.txt             删除后缀名为txt的全部文件 10、cls(clear screen)         清空屏幕 11、exit               退出dos命令行 12、systeminfo            查看系统信息 13、rd /s /q+文件夹名         删除所在目录下的文件夹 14、del /s /q+文件名         删除所在目录下的文件 来源: https://www.cnblogs.com/zhangzimuzjq/p/9077669.html

lamp apache配置虚拟主机

人盡茶涼 提交于 2020-03-05 09:46:28
You don't have permission to access /index.php on this server directoryIndex index.html index.php index.htm index.shtml login.php /etc/httpd/conf/httpd.conf 解决apache AH01630: client denied by server configuration错误 post by rocdk890 / 2014-4-16 15:58 Wednesday linux技术 发表评论 昨天给公司配置了apache-2.4.9的版本,今天他们要求把虚拟主机配置起好放网站程序,在修改apache-2.4.9的配置文件中,我发现了 2.4.x跟以前的2.2.x里面的很多配置都不一样了,比如配置这个虚拟主机都有一些不同,按照以前的配置方法,会报下面的错误: AH01630: client denied by server configuration: /usr/local/apache/htdocs/recx/ 先给大家看看我按照apache-2.2.x配置虚拟机的内容: NameVirtualHost 192.168.10.81:80 <VirtualHost 192.168.10.81:80> ServerAdmin

wampserver_x86_3.0.6 允许外网访问配置教程

[亡魂溺海] 提交于 2020-03-05 07:22:09
1.打开wamp目录下的apache配置文件中的httpd.conf 用可以看行数的编辑器打开 大概244行: 改为 <Directory /> AllowOverride none Require all granted </Directory> 大概288行: 改为 # onlineoffline tag - don't remove Require all granted 大概387行: 改为 <Directory "${INSTALL_DIR}/cgi-bin"> # AllowOverride None Options None Require all granted </Directory> 2.打开httpd-vhosts.conf 将Directory里面内容更换为以下内容 <Directory "c:/wamp/www/"> Options +Indexes +Includes +FollowSymLinks +MultiViews AllowOverride All Require local Require all granted </Directory> 来源: https://www.cnblogs.com/xinjianheyi/p/6795848.html

.net操作文件

大憨熊 提交于 2020-03-03 20:18:20
//1.---------文件夹创建、移动、删除--------- //创建文件夹 Directory.CreateDirectory(Server.MapPath("a")); Directory.CreateDirectory(Server.MapPath("b")); Directory.CreateDirectory(Server.MapPath("c")); //移动b到a Directory.Move(Server.MapPath("b"), Server.MapPath("a\\b")); //删除c Directory.Delete(Server.MapPath("c")); //2.---------文件创建、复制、移动、删除--------- //创建文件 //使用File.Create创建再复制/移动/删除时会提示:文件正由另一进程使用,因此该进程无法访问该文件 //改用 FileStream 获取 File.Create 返回的 System.IO.FileStream 再进行关闭就无此问题 FileStream fs; fs = File.Create(Server.MapPath("a.txt")); fs.Close(); fs = File.Create(Server.MapPath("b.txt")); fs.Close(); fs = File

第九周

杀马特。学长 韩版系。学妹 提交于 2020-03-03 12:46:51
1、编写脚本,接受二个位置参数,magedu和/www,判断系统是否有magedu,如果没有则自动创建magedu用户,并自动设置家目录为/www #!/bin/bash PW=\`tr -dc '[:alnum:]' </dev/urandom |head -c6\` while read -p "please input your [username] and [home directory]:" name dir ;do if [ -z "$name" ] ;then echo "Please enter the correct user and directory separated by spaces!" elif [ -z "$dir" ];then echo "Please enter the correct directory!" elif \`id $name &> /dev/null\`;then echo "$name already exist!" elif \`useradd $name -d $dir &> /dev/null\`;then echo $name is created!;echo 123456 |passwd --stdin $name &> /dev/null;echo -e "Username is $name\nHome

How do i zip files in python without all directories written to it

泄露秘密 提交于 2020-03-03 08:40:10
问题 Im trying to zip multible files but i have run into a strange problem when i opened the zip file all directories leading to the files are listed as well home/site/Uploads/test/ Here is the python code i have written import os import zipfile zf = zipfile.ZipFile("myzipfile.zip", "w") for dirname, subdirs, files in os.walk("D:/home/site/Uploads/test/"): zf.write(dirname) for filename in files: zf.write(os.path.join(dirname, filename)) zf.close() The zipped files are fine but why is every other

二周第一次课(10月23日) 2.6 相对和绝对路径 2.7 cd命令 2.8 创建和删除目录mkdir/rmdir 2.9 rm命令

会有一股神秘感。 提交于 2020-03-02 19:11:40
2.6 相对和绝对路径 路径 :任何一个文件都有一个从根开始的地方 绝对路径: 从根开始的路径 叫绝对路径(不管你在哪个目录下,都能找到想找的文件) 例子:你在 目录/ tmp/ 可以通该路径找到其他目录下的文件就是绝对路径 相对路径: 相对所在位置的路径 (只能在当前的目录下寻找文件) 例子: 相对当前位置的路径找的文件 pwd = 查看当前所在的路径 目录 2.7 CD命令 ​​​​​​​ cd= change directory 改变位置, 进入其它目录 cd - = 进入上次所在目录位置。 cd = 回到用户的家目录下。 cd ~ = ~ 和用户的家目录是一致的 cd .. = 进入上一级的目录 cd= change directory 改变位置, 进入其它目录 cd - = 进入上次所在目录位置。 cd = 回到用户的家目录下。 cd ~ = ~ 和用户的家目录是一致的 cd .. = 进入上一级的目录 2.8 创建和删除目录mkdir rmdir ​​​​​​​ mkdir = make directory 创建目录 mkdir -p = 级联创建目录。 mkdir -v = 可视化 rmdir = remove directory 移除 删除目录,无法删除文件 rmdir -p =级联删除空目录,无法删除文件 (容易出错少用) mkdir创建目录 mkdir

5月31日任务配置防盗链、访问控制Directory、访问控制FilesMatch

不想你离开。 提交于 2020-03-02 14:32:15
11.25 配置防盗链 <Directory /data/wwwroot/abc.com> SetEnvIfNoCase Referer "http://www.abc.com" local_ref SetEnvIfNoCase Referer "http://abc.com" local_ref SetEnvIfNoCase Referer "^$" local_ref <filesmatch "\.(txt|doc|mp3|zip|rar|jpg|gif)"> Order Allow,Deny Allow from env=local_ref </filesmatch> </Directory> 11.26 访问控制Directory <Directory /data/wwwroot/abc.com/admin/> Order deny,allow Deny from all Allow from 127.0.0.1 </Directory> 针对目录实现控制. 控制对象为来源ip 11.27 访问控制FilesMatch <Directory /data/wwwroot/abc.com/> <FilesMatch "admin.php(.*)"> Order deny,allow Deny from all Allow from 127.0.0.1 </FilesMatch>