and owner of a file. When should I use chown or chgrp? Maybe you think it's strange? Yes, sometimes it is necessary to change the owner of a file. The most common example is to use the simplest CP command to explain when copying a file to someone other than you:
[Root @ WWW ~] #CPSource File target
use Chown or chgrp? Maybe you'll find it strange? Yes, it's true that sometimes you need to change the owner of the file, and the most common example is when you copy the file to someone else, we use the simplest CP to illustrate:
[Root@linux ~]# CP source File Destination file
Suppose you want to copy the.
destination file must be "directory" line! Example: Example one: Copy the. BASHRC from the home directory to/TMP and rename it to BASHRC [[emailprotected] ~]# CD /tmp [[emailprotected] tmp]# cp ~/.BASHRC BASHRC [[emailprotected] tmp]# cp-i ~/.
the owner of all subdirectories or files under the directory, add the-R parameter directly. Let's take a look at the syntax and examples:
[Root @ linux ~] # Chown [-R] account name file or directory[Root @ linux ~] # Chown [-R] Account name: User Group name file or directoryParameters:-R: Perform recursive changes, that is, all the files and directories under the subdirectory.Are updated to this user group
, the default backup tail string is ~, or it can be specified by-s3.existing or nil will use the current mode, the program will first check whether there is a backup number, if there is a backup number, if not the use of simple backupFile systems that are stored in files or directories that are copied by-X or--one-file-system must be the same as the file system in which the CP directive is executed, otherwi
file or directory[Root@linux ~]# Chown [-r] Account name: User group name file or directoryParameters:-r: Continuous changes to recursive (recursive), that is, all files, directories under subdirectoriesare updated to be the user group. Often used when changing a directory.Example:[Root@linux ~]# Chown bin Install.log[Root@linux ~]# Ls-l-rw-r--r--1 bin users 68495 June 08:53 Install.log[Root@linux ~]# chow
, and so on. Almost as long as we can use it as a setup file all belong to this type of file. For example, you can release ' cat ~/.BASHRC ' to see the contents of the file. (Cat is the instruction to read the contents of a file)
o binary
your root directory? Use [ls-a] to confirm. If not, refer to the appendix in this section for how Bash handles it.
/Etc/profile ,. the typical processing content in bash_profile is the setting of important environment variables such as PATH and USER, the restriction of croe file size at the end of program exception, and the Read and Write attributes of new files. The specific/etc/profile and. bash_profile file
Linux File Permissions ConceptsWhen your screen appears "Permission deny", do not worry, "must be a permission set error"! (The following excerpt from the bird Brother's Linux private dishes sixth chapter, Linux file permissions and directory Configuration 2.) Linux file permissions concept)Linux file propertiesAfter y
about implementation and introduction in the program notes.
File Submission page: (can be submitted separately to doaction.php, doaction1.php, doaction2.php for testing)
upload.php
File Upload
doaction.php
doaction1.php
doaction2.php
$maxSize) {exit (' upload file too large '); } echo $fileInfo [' type ']; Exit $ext = Strtolow
File type, C language file read/write, File Buffer, file opening method, file operation functionFile types include stream files and device files. device files such as VGA interfaces, serial ports, USB ports, network ports, and serial ports are abstracted into files by the op
# Region: determines whether a file exists. If the file does not exist, it is created. Otherwise, the read value is displayed in the form.
PublicFormmain ()
{
Initializecomponent ();
// Readfile (application. startuppath + "// alarmset.txt ");
// Determine whether a file exists
// System. Io. directoryinfo info = new system. Io. directoryinfo (applica
accept user commands, so it is also called conversational Shell when Level 2 conversational Shell is started, will automatically read. bashrc is interpreted and executed by the called Shell. Generally, all user-defined settings are described in/etc/bashrc, but/etc/bashrc cannot be read automatically. It must be indicated by.
SpringMVC single file upload, multi-File Upload, file list display, file download, springmvc File Upload
Original works of Lin bingwen Evankaka. Reprinted please indicate the source http://blog.csdn.net/evankaka
This document describes in detail the single
Enter a filename and path to create the file, save the input from the keyboard to the file, and finally output the path to the file, the file name, and the contents of the file to the screen.
#include
1. Bash configuration file
In your home directory, run
ls .bash*
You will see these files:
L. bash_history: records the commands you previously entered,L. bash_logout: the command to be executed when you exit the shell,L. bash_profile: the command to be executed when you log on to the shell,
L. bashrc: the command to be executed every time a new shell is opened.
Note the following two differences :'. bash_
of a file:
chmod changing permissions for a file
Number Type change 1 sudo chmod 600 xxx (only the owner has read and write permissions) 2 sudo chmod Span style= "color: #800000; Font-weight:bold; " >644 xxx (owner has read and write permissions, group user only Read permissions) 3 sudo chmod 700 xxx (Only the owner has permission to read and write and execute) 4
Import java.io.*;Class Sortchar{Private String str;Private Char arraylist[];Private BufferedReader BR; Character StreamPrivate File F; Read the fileSortchar (String s){F=new File (s);}public void Start (){if (Inputdata () ==-1){Return}To bubble sort a character arraySortchar ();Turns the sorted array into a string and writes the string to the B.txt file through t
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.