* Create function:*public boolean CreateNewFile (): Creates a file This article assumes exists. Do not create (transfer File.createnewfile () return false)*public boolean mkdir (): Creates a directory in this directory. is not created (calling
$dir = "/txt/xiaozui/";Is_dir ($dir);//Determine if it is a table of contents riceIs_file ($dir);//Determine if it is a fileOpendir ($dir);//Open a directory handle, return a resource setReaddir ($dir);//Read entry in a clause, successfully returns
I. Cp.get_file implementing files from the master side to the Minion serverCp.get_file1. Modify/etc/salt/master to specify the root directory of the server's workFile-roots:-Base:/srv/salt (default path, can be specified)2. Create a
UNIX advanced environment programming (3) Files And Directories, unixdirectories
In the previous two articles, we learned some basic operation functions of IO operations, including open, read, and write.
In this article, we will learn about other
Issue Overview: Administrators of Windows Server 2008 can specify NTFS permissions to user accounts or group accounts based on security requirements. Typically only the system administrator, the owner of a file or directory, or a consumer who has
Whether you delete a file or delete a directory, you need only one line of code to completeDelete a file (delete the file generated before _samples/test.txt) _samples/test.txtDelete _samples/test.txt file(example file:
Reference Link: http://www.cnblogs.com/ggjucheng/archive/2011/12/14/2287738.htmlhttp://blog.csdn.net/novrose/article/details/7670477Http://blog.sina.com.cn/s/blog_7d5d42b40100ulqn.htmlFirst, the difference between the case suffix. s assembly
1. Common Nsfilemanager File methods-(NSData *) Contentsatpath:path//Read data from a file-(BOOL) Createfileatpath:path contents: (NSData *) data attributes:attr//write to a file-(BOOL) Removeitematpath:path error:err//Delete a file-(BOOL)
Comparison of special directories:. Represents this Layer directory.. Represents a previous level directory-Represents a previous working directory~ Represents the home folder where the current user's identity resides~account represents the home
Directories and PathsCD: Switch directoriesFor example: CD ~willhua, go back to user Willhua's home folderCD ~ or CD, it means back to your home folderCD-, which means back to the previous directorypwd: Displays the directory where you are
Compression Decompression Command:compression format: gz,bz2,xz,zip,zCompression algorithm: Different algorithms, compression ratios will also be different:Compress::filename. ZUncompressCurrently the most popular compression tools:gzip:. GZ only
Today's maintenance of the system found a very strange problem: AAA users and BBB users belong to the same AAA group, but with AAA user-created files, permissions set to 777, or can not be deleted with BBB users. Weird!After several turnover, found
For file
R can read the actual contents of the file
W can edit the contents of the file
X files can be executed by the system
For directory
R has a list of structures that read the directory, which means you can use the LS command
Set permissionsChmod[-r]permission filename|directory(1) Modifying permissions in digital notation------------------------------------------------The number notation reads R, W, x as 4, 2.1来, and the part that is not granted is represented as 0 and
Example:-rw-r--r--1 root root 42304 Sep 4 18:26 Install.log#第一个字符代表这个档案是 "directories, files, or linked files, etc.":When [d] is the directory, for example, the row with the table file named ". GConf";When [-] is the file, for example, the previous
Linux file extension: A Linux file can be executed, and his first column of the 10 attributes, and the file name is not at all related.Common extensions:*.sh: script or batch file (scripts), because the batch file is written using the shell, so the
Chown, which is the change ownerSuch as:Hadoop-1.2.1.tar.gz the original owner as a Hadoop user, now change its owner to root:========================================================================chmod, which is the change modeThere are 10
In this essay, we mainly introduce some commands related to the management of archives and directories in the Linux environment, including the following aspects:
Directory related operations: Cd,pwd,mkdir,rmdir (RM)
File and directory
Additions and deletions to Linux files and directories1)echo displays a line of content.Touch if the file/directory does not exist, create a new file/directory, or if the file exists, it is the last access time to update the file.Usage touch [-ACM] [
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.