In the development process, sometimes we want to put the program in our source code directory, such as D:\code, rather than on JBoss deploy, what to do?We know that we have Tomcat integrated in JBoss, so you can configure this directory just like Tomcat, just find the server.xml.For different versions of JBoss, the directory name may be slightly different:For jbo
[Go] Original address: http://blog.csdn.net/liuweiyuxiang/article/details/71154346Gets the path to the current file: from Import Path = Path.dirname (__file__) # returns the directory where the current file is located # __file__ is the current file, If running this line in the IDE will cause an error, change to #d = Path.dirname ('. ')To get the parent directory for a path:# get the
PHP List file directory tree A method, you can also determine whether its files are directories, the files in its directory clearly displayed, can help us to understand the directory of the situation, you can quickly see how many directories in this directory, which is not a direct
Wampserve ways to modify the default Web site directory, wampserve directory
1wamp Introduction
Wampserve integrates Apache, MySQL, PHP, phpMyAdmin, Apache-enabled mod_rewrite,php extensions, Apache modules only need to be on the menu "on/Off" point on the spot, eliminating the hassle of modifying the configuration file, This is abbreviated as WAMP.
Assume the following:
Wamp Version: 2.1
WAMP2.0 installa
Entos Install the Software directory1. If the RPM installation is possible: RPM-QL Package-name2. You can find directly on the root directory. -name a file name in the software but the installation software is generally in the/usr/local directory,This is the default directory to install the software, so the search can be in the/USR
In Linux, you will often see the file size, which is usually used by the command du:The command is explained in detail below:[Email protected] logs]$ du--helpUsage: du [options] ... [File] ...Or: du [options] ...--files0-from=fCalculate the disk usage for each file, and the directory will take the total amount.The long option must use parameters that are also required for short options.-A,--all the disk usage of all files, not just the
The following summary is passed using the tomcat5.0.28 test, and the Tomcat installation path is C:\Tomcat
After the default installation, Tomcat's home directory is the Webapps/root directory, and if we want to change Tomcat's home directory, we can do this:
1. Open C:\Tomcat\conf\server.xml and add code between
:
This restarts Tomcat, and our home
This situation will meet more, like a Web project, if you write an XML or some other file under SRC, when the project is published to the server, the Web program is running the program under the Tomcat and other servers, this time, the program directory does not have the SRC folder, So what do we do in this situation?In fact, when the program is published to the server, SRC files will also be published together to the server, but there is no src
Laravel root directory can access Route::get ('/', ' [email protected] ');The non-root directory will be 404 pages can not find the error, as followsRoute::get (' user ', ' [email protected] ');Workaround:First before installing1,php Open Phpopenssl2, open rewrite in Apache confModules (#LoadModule rewrite_module modules/mod_rewrite.so)3, locate directory in the
Directory Operations
New Catalogmkdir (path, permissions, recursive creation)
Delete DirectoryRmDir ()
Move (rename)Rename ()
Get directory ContentsOpen DirectoryDirectory handle = Opendir ()Read DirectoryFile name = Readdir (directory handle)Reads the file name in turn, moves the handle pointer down, and returns false if it is not readClose Di
How does a domain name access level two directory but does not display a level two directory path?
How does a domain name access level two directory but does not display a level two directory path?
For example, my site www.abc.com has specified the root directory of index.ph
#! /Bin/bash
:
'
History: 2013.04.12 | 2012.12.06 | 2013.06.20
Title: mount the shared directory of the server to the local Ubuntu directory.
Noter: Mount different server by the input short name.
-> Format: sudo Mount-T smbfs // ip/server_folder/locate_mount_folder/-O iocharset = utf8, uid =$ {user}, Gid =$ {user }, umask = 022, username = usname, password = passwd
-> 201212061722 first release by N.
->
In web development, we may encounter the need to empty all files in a directory, but not delete subdirectories in this directory (and certainly not delete the deleted root directory).
So how do you deal with this method of deleting a file without deleting the directory?
The following bloggers will share with you a b
/Boot stores kernel files and module images during system startup.
/Bin: the folder of commands that normal users can execute. Some of the commands are stored in/usr/bin.
/Etc stores the system configuration directories and files
/Dev stores Device Files
/Home the Home Directory of a common user
/Lib stores library files
/Initrd use RAM disk to start the folder where the user mounts the RAM device
/MISC autofs main
Remove directory structure plus--strip-components N
Such as: Compressed file Eg.tar file information for Src/src/src/eg.txt
Run TAR-XVF Eg.tar--strip-components 1
Result: Src/src/eg.txt
If you run TAR-XVF Eg.tar--strip-components 3
The result of the decompression is: eg.txt
In the decompression, if you want to specify the extract directory, you can add parameter-C target
-(BOOL) Fileexistsatpath: (NSString *) path isdirectory: (BOOL *) isdirectoryIn general, the iOS system determines whether a file or directory exists, you can use the above API.The second parameter, Isdirectory, is an outgoing parameter that returns whether it is a file or a directory.This API is used in two general casesNeed to determine whether a file or directory existsDemand two. Determine if path is a
Open the directory under the current directory under Pic subdirectory common.
$handler = Opendir (' Pic/common ');
Copy Code2. Loop through all the files in the directory
/* Where $filename = Readdir ($handler)
The read file name is assigned to $filename each time the loop is passed, $filename!== false.
Be
To traverse the file name in a directory, it is convenient to use Os.walk. He returns a list of tuples as elements. Each element contains three contents: a path, a subdirectory under that path, and a file under that path.Os.walk uses the generator technology (refer to other documentation or technical information) yield, which gives the user great flexibility in use. Because the generator technology makes the call of function walk return only one tuple
To prevent Apache from displaying a list of directory structures, simply remove the Indexes in Option.
For example, let's look at the directory configuration for a directory:
The code is as follows
Copy Code
Options Indexes followsymlinks allowoverride None order Allow,deny allow from all
You just need to remove the Indexes
How to represent a parent directory.. /indicates the directory where the source file is located, at the top level of the directory. /.. /represents the upper parent directory of the directory where the source file resides, and so on.Suppose the info.html path is: c:/inetpub/
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.