Unix Day1
Commands to Learn,
Commands to Learn,
- ls
- cd
- pwd
1.ls
When invoked without any arguments, lists the files in the current working directory. Files whose names start with "." are not listed, unless the -a flag is specified or the files are specified explicitly.
Without options, ls displays files in a bare format. This bare format however makes it difficult to establish the type, permissions, and size of the files. The most common options to reveal this information or change the list of files are:
-l long format, displaying Unix file type, permissions, number of hard links, owner, group, size, date, and filename
-F appends a character revealing the nature of a file, for example, * for an executable, or / for a directory. Regular files have no suffix.
-a lists all files in the given directory, including those whose names start with "." By default, these files are excluded from the list.
-R recursively lists subdirectories. The command ls -R / would therefore list all files.
2.cd
Is a command line command used to change the current working directory in the Unix and DOS operating systems. A directory is a logical section of a filesystem used to hold files. Directories may also contain other directories. The cd command can be used to change into a subdirectory, move back into the parent directory, move all the way back to the root (/ in UNIX, \ in DOS) or move to any given directory.
3.pwd
command (print working directory) is used to print the name of current working directory from a computer's command-line interface.
Example:
$ pwd
/home/foobar
When invoked without any arguments, lists the files in the current working directory. Files whose names start with "." are not listed, unless the -a flag is specified or the files are specified explicitly.
Without options, ls displays files in a bare format. This bare format however makes it difficult to establish the type, permissions, and size of the files. The most common options to reveal this information or change the list of files are:
-l long format, displaying Unix file type, permissions, number of hard links, owner, group, size, date, and filename
-F appends a character revealing the nature of a file, for example, * for an executable, or / for a directory. Regular files have no suffix.
-a lists all files in the given directory, including those whose names start with "." By default, these files are excluded from the list.
-R recursively lists subdirectories. The command ls -R / would therefore list all files.
2.cd
Is a command line command used to change the current working directory in the Unix and DOS operating systems. A directory is a logical section of a filesystem used to hold files. Directories may also contain other directories. The cd command can be used to change into a subdirectory, move back into the parent directory, move all the way back to the root (/ in UNIX, \ in DOS) or move to any given directory.
3.pwd
command (print working directory) is used to print the name of current working directory from a computer's command-line interface.
Example:
$ pwd
/home/foobar
No comments:
Post a Comment