Directories, files and Redirection Flashcards
What is an alias?
Alias gives a command an alias name to use, only around during your current shell however you can save it in the startup file, however other currently running shells will have to be restarted to get that configuration
What is one limitation for a alias?
cannot put any variable information into the alias
What are the values in “drwr-xr 2 jacob jacob 4096 Jan 10 16:40 bin” for
–first set of values indicates the file type d is a folder, and - is a normal file.
–After the D or - the r, rw, x, indicates permissions.
R - read,
RW - read and write,
x - execute
–number is a link count
–Next information is the owner, then group
–number is the size of the file or folder
–date and time of last modification
–Last is the name of the file or folder
What option would you use with ls command to show you hidden files/folders
-a, those files start with a .
What option would you use with ls to show the file size in bytes?
-li
What does the mkdir command do?
makes a directory
What does the cd command do?
changes the directory, followed by the directory name
What does the touch command do?
creates and empty file
What does the rm command do?
removes a file
What does the cd.. command do?
takes you back one level
What does the rmdir command do?
removes a directory
What does the pwd command do?
print working directory
What does the cd - command do?
takes you back to where you last were
What does the cd command do with no other input?
takes you home, cd~ also takes you home
What does the cd~/bin command do?
takes you to the home and then to the bin directory, replace bin for any other directory