directory

H3CNE实验:H3C设备文件管理

一世执手 提交于 2019-12-29 10:58:01
第1步:配置文件的管理操作 (1) save [ safely ]——在H3C设备上将当前配置保存到存储介质的根目录下。 快速保存方式:不带 safely 参数。 安全方式:带 safely 参数。 (2) save file-url ——将当前配置保存到指定文件,但不会将该文件设置为下次启动配置文件。 (3) startup saved-configuration cfgfile ——在用户视图下,用来配置下次启动配置文件(系统下次启动时使用的配置文件)。 undo startup saved-configuration 命令用来设置设备以空配置启动,空配置启动是指使用设备的出厂配置启动。 (4) display startup 命令查看用于本次及下次启动的配置文件名。 <H3C>display startup MainBoard: Current startup saved-configuration file: NULL Next startup saved-configuration file: flash:/startup.cfg 在输出的信息中,可以看到当前运行的配置文件是空配置文件,而且已经设置下次启动时使用的配置文件的名称是 startup.cfg。 (5) backup startup-configuration to dest-addr [ dest

Can one add custom properties to NTFS folders?

早过忘川 提交于 2019-12-29 08:44:28
问题 I would like to be able to add my own custom data/properties to existing folders on NTFS, so that if a folder is moved, the properties move with it. One solution would be to store a file within the folder to contain whatever I need or want. What I am particularly interested in, is whether or not there is a way to add custom properties to the directory file system object itself. 回答1: If you are feeling brave ( or foolish ) perhaps an Alternative Data Stream would be an alternative. I am not

Reading image from outside public_html with PHP?

。_饼干妹妹 提交于 2019-12-29 08:09:08
问题 this is really stupid, but I been trying dozens of different things and I can't for the life of me work out what I am doing wrong. I have a cpanel installation, with the usual public_html directory and access to the directory below that (call that directory "USER"). I am testing out some things with images. I have put an image file above the public_html, into the USER directory. I have written a test php script which has just a few lines: if(is_file("../1.jpg")){ echo "<img src=\"../1.jpg\" /

PHP pull random image from folder

耗尽温柔 提交于 2019-12-29 06:23:54
问题 I am wondering about a "better" way of pulling a random image from a folder. Like say, to have php just select a random image from folder instead of searching and creating an array of it. here is how I do it today <?php $extensions = array('jpg','jpeg'); $images_folder_path = ROOT.'/web/files/Header/'; $images = array(); srand((float) microtime() * 10000000); if ($handle = opendir($images_folder_path)) { while (false !== ($file = readdir($handle))) { if ($file != "." && $file != "..") { $ext

Nested directory creator: Phonegap

大城市里の小女人 提交于 2019-12-29 05:25:12
问题 How can I create a nested directory in Phonegap with this API? fileSystem.root.getDirectory("Android/data/com.phonegap.myapp/dir_one/dir_two/", {create:true}, gotDir, onError); I am using Phonegap 1.8.0 in Android 2.2. 回答1: This function will help you create nested dirs. document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { console.log("device is ready"); window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; window

Alternative to FolderBrowserDialog [closed]

谁都会走 提交于 2019-12-29 05:13:07
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 10 months ago . Is there an alternative for selecting folders in C#? Optimally I'd like to use the OpenFileDialog to select folders, or at least something similar to that. 回答1: Here you have and OpenFileOrFolder dialog and here another FolderBrowserDialog both Open Source. 回答2: Ookii Dialogs libraries have an implementation

日志帮助类

三世轮回 提交于 2019-12-29 04:50:58
工作中经常在调试代码的时候采用日志的形式去记录异常情况,一般都是采公司的一个日志帮助类,没有自己写过相关代码,今天自己写了一个日志帮助类,其中可以记录相关文本内容,‘ 如果只输入日志内容,测文本按照日期的格式,把日志写入程序所在的根目录。同时可以设置文件的路径,文件的名称,和文件是增加或者保持最新的一个。全部代码如下: 定义日志接口: interface ILogHelp { bool WriteLog(string msg); bool WriteLog(string msg, string path); bool WriteLog(string msg, string path, string fileName); bool WriteLog(string msg, string path, string fileName, bool isdelete); } 接口隐式实现代码: public class LogHelp:ILogHelp { public bool WriteLog(string msg) { var currenPath = System.AppDomain.CurrentDomain.BaseDirectory + "/Logs"; var fileName = System.DateTime.Now.ToString("yyyy-MM-dd hhmmss

how to display folders and sub folders from dir in PHP

百般思念 提交于 2019-12-28 18:45:08
问题 I am trying to get a list with folders and sub folders i have the following that allows me to get the folders and sub folders but i needed it to be sorted out like the e.g below i have been trying but i dont know how i would get around. Root/ Root/Images Root/Images/UserImages Root/Text/ Root/Text/User1/ Root/Text/User1/Folder2 but at the monent its display like this Root/css/ tree/css/ js/ images/ PHP CODE: function ListFolder($path) { $dir_handle = @opendir($path) or die("Unable to open

Remove empty subfolders with PHP

为君一笑 提交于 2019-12-28 13:56:49
问题 I am working on a PHP function that will recursively remove all sub-folders that contain no files starting from a given absolute path. Here is the code developed so far: function RemoveEmptySubFolders($starting_from_path) { // Returns true if the folder contains no files function IsEmptyFolder($folder) { return (count(array_diff(glob($folder.DIRECTORY_SEPARATOR."*"), Array(".", ".."))) == 0); } // Cycles thorugh the subfolders of $from_path and // returns true if at least one empty folder has

Copy folder structure (sans files) from one location to another

情到浓时终转凉″ 提交于 2019-12-28 07:35:44
问题 I want to create a clone of the structure of our multi-terabyte file server. I know that cp --parents can move a file and it's parent structure, but is there any way to copy the directory structure intact? I want to copy to a linux system and our file server is CIFS mounted there. 回答1: You could do something like: find . -type d >dirs.txt to create the list of directories, then xargs mkdir -p <dirs.txt to create the directories on the destination. 回答2: cd /path/to/directories && find . -type