Learn the Command Line---MANIPULATION ls, revisited
What I did today...
---the
ls
command has several more options. Here are three common options:-a
- lists all contents, including hidden files and directories-l
- lists all contents of a directory in long format-t
- order files and directories by the time they were last modified.ls -alt
---
ls -alt
lists all contents, including hidden files and directories, in long format, ordered by the date and time they were last modified.
Here's what each column means(from left to right):
- 1. Access rights. These are actions that are permitted on a file or directory.
- 2. Number of hard links. This number counts the number of child directories and files. This number includes the parent directory link (
..
) and current directory link (.
). - 3. The username of the file's owner. Here the username is
cc
. - 4. The name of the group that owns the file. Here the group name is
eng
. - 5. The size of the file in bytes.
- 6. The date & time that the file was last modified.
- 7. The name of the file or directory.
How to navigate to the drama/biopic/ directory?
cd ../drama/biopic/
cp
command copiesmv move files
rm removes deletes files and directories
The
-r
is an option that modifies the behavior of the rm
command. The -r
stands for "recursive," and it's used to delete a directory and all of its child directories.Notes: Be careful when you use
rm
! It deletes files and directories permanently. There isn't an undelete command, so once you delete a file or directory with rm
, it's gone.What did I learn...
I learned more about how Command Line works and got lots of practice from the lessons. During the lesson, I found some serious problems about the website. It sometimes automatically resets the lessons and made me lose all my progress.
What I'm doing tomorrow...
Because of the problems that I found about the Codecademy website, I've been thinking about changing my learning progress to another website such as w3schools.
No comments:
Post a Comment