Linux introduction: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
No edit summary
Line 36: Line 36:
And, to obtain detailed information on all files (permissions, owner, group, size and last modification date):
And, to obtain detailed information on all files (permissions, owner, group, size and last modification date):
{{Command|ls -l}}
{{Command|ls -l}}
The option <tt>-h</tt> gives the file sizes in human readable format.
The option <code>-h</code> gives the file sizes in human readable format.


<!--T:9-->
<!--T:9-->
Line 72: Line 72:
To recursively copy a directory:
To recursively copy a directory:
{{Command|cp -R source_directory destination_directory}}
{{Command|cp -R source_directory destination_directory}}
To rename a file or a folder (directory), use the <tt>mv</tt> command (move):
To rename a file or a folder (directory), use the <code>mv</code> command (move):
{{Command|mv source_file destination_file}}
{{Command|mv source_file destination_file}}
This command also applies to directories. You should then replace <tt>source_file</tt> with <tt>source_directory</tt> and <tt>destination_file</tt> with <tt>destionation_directory</tt>.
This command also applies to directories. You should then replace <code>source_file</code> with <code>source_directory</code> and <code>destination_file</code> with <code>destionation_directory</code>.


== File permissions == <!--T:15-->
== File permissions == <!--T:15-->
UNIX systems support 3 types of permissions : read (<code>r</code>), write (<tt>w</tt>) and execute (<tt>x</tt>). For files, a file should be readable to be read, writable to be modified, and executable to be run (if it's a binary executable or a script). For a directory, read permissions are necessary to list its contents, write permissions enable modification (adding or removing a file) and execute permissions enable changing to it.
UNIX systems support 3 types of permissions : read (<code>r</code>), write (<code>w</code>) and execute (<code>x</code>). For files, a file should be readable to be read, writable to be modified, and executable to be run (if it's a binary executable or a script). For a directory, read permissions are necessary to list its contents, write permissions enable modification (adding or removing a file) and execute permissions enable changing to it.


<!--T:16-->
<!--T:16-->
rsnt_translations
53,770

edits

Navigation menu