Counts the number of files in the current folder, including subfoldersLs-lr|grep "^-" |wc-lThe number of directories under the statistics folder, including the sub-foldersLs-lr|grep "^d" |wc-lCount the number of files in the current folderLs-l |grep
1 //Delete all files under a file directory and delete the current folder Chrdirname = _t ("c:\\123");2 BOOL civmsvrinfo::releasedirectory (CString chrdirname)3 {4BOOL bremove =doremovedirectory (chrdirname);5 if(bremove)6 :: RemoveDirectory
1. Count the number of files in the current folderLs-l |grep "^-" |wc-l2 . Count the number of directories under the current folderLs-l |grep "^d" |wc-l3. count the number of files in the current folder, including subfoldersLs-lr|grep "^-" |wc-l4.
PWD View current work pathCD into a folder ... Switch to Parent directory/switch to the root directoryLs-l view in long format that-A view information for all subdirectories and files, hidden files can also be viewed-D View the properties of the
(i) Get the files and directories in the current directory
Knowledge points
1 Application of the file object2 Listfiles () method3 Isdirectory () method, Isfile () method to determine whether a directory or file4 Conversion String Method
The PHP glob () function returns the file name or directory that matches the specified pattern. So we can use the Glob function to find the file, or we can implement the directory traversal.
Function Description: Array glob (string $pattern [, int $
Permissions Management for filesLs-l, you can also use the LL command to view information about file permissionsFirst column "-rw-r--r--." For permission information, the last point of the permission information is expressed as a security
Transferred from: http://www.cnblogs.com/kerrycode/p/4391859.htmlIn the Windows system, we can use the TreeSize tool to find some large files or folders, very convenient and efficient, in the Linux system, how to search for some of the larger files?
1. Directory Operations:(1) CD (Switch directory)CD ~ Back to home directoryCD Back to home directoryCd.. Back to top directoryCD-Go back to the directory just nowCd/var/spool/mail Absolute PathCd.. /mqueue relative Path (written by/var/spool/mail
File read/writeFile read and write refers to the reading of information from a file or writing information to a file. Linux file reads can be implemented using the Read function, and file writes can be implemented using the Write function. when a
Java files in the Usebean package (defined by itself, below the src folder)Fileaccept.java PackageUsebean;ImportJava.io.File;ImportJava.io.FilenameFilter; Public classFileacceptImplementsfilenamefilter{PrivateString Extendname; Public
File and directory operation commands, organized according to the following ideas, feel more convenient to remember and use1. Create a binary fileTouch F12. Write data to the fileecho "Hello" >> F1echo "World" >> F1 (the world is appended to
File default permissions: Umaskumask0022 umask-sU=rwx,g=rx,o=rxThe default situation is as follows:If the user is created as "file" then the default "no operational (x) permissions", that is, only the RW two items, which is the maximum
The Linux file is rooted as the starting point, the Linux/Representative start is the root, because Linux is the inverted root you can directly understand as a tree upside down, first the roots, then the trunk, then the branches finally reach the
Command formatRM [OPTION] ... FILE...Command parameters-F,--forceForce Delete, ignore nonexistent files, do not prompt.-I.,--interactiveThe user is prompted for confirmation when the file has not been deleted.-I.Prompt the user for confirmation
1. Command formatCD [Directory name]2. Command functionSwitch the current directory to the input directory3. CaseCD/go to the root directoryCD ~ Go to the/home/user user directoryCd/usr go to the USR directory in the root
Special permissions:SUID;When a user runs a program, the owner of the corresponding process is the owner of the program file itself, not the owner of the initiating process user.#chmod u+|-s FILEIf file originally has execute permission, it is
Introduction and practice of special permission bits for Linux files and directoriesIn Linux, both Superuser root and normal user can use the command "passwd" command to modify their password, but everyone who knows Linux know that the Linux
File/etc//etc/passwdUser basic information/etc/groupUser Group basic information/etc/shadowAdditions to the/etc/passwd file/etc/gshadowGroup configuration file in shadow password set/etc/login.defsProvides a baseline for many parameters in a shadow
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.