unit 2A

Cards (39)

  • You can use >> to append to (add to the end of) an existing file.
  • The command echo “This is Appending” >> ~/lab2_q1.txt will add “This is Appending” to the end of the text in file ‘lab2_q1.txt’.
  • The most important commands for file and directory manipulation are create, touch, move/rename, and delete.
  • Linux File Names are Case Sensitive, for example, AAA.txt is not the same as aaa.txt.
  • Spaces in filenames create issues when using the command line, use _ instead.
  • The touch command creates an empty file.
  • Standard I/O’s let you string commands together like building blocks to solve complex tasks.
  • Standard output provides a way to access the output of a process.
  • The echo command can be used to redirect the output from the screen to a text file.
  • Every process has at least three communication channels available to it: Standard input (STDIN), Standard output (STDOUT), and Standard error (STDERR).
  • Unix File Types and Permissions are represented by the following: drwxr-xr-x 2 robert robert 4096 Sep 13 13:09 Desktop.
  • The ls command list the content of a directory (default is the current directory).
  • The Linux File System is organized around the root drive (/) and uses the forward slash (/) between folder names.
  • Standard input provides a way to send data to a process.
  • Standard error errors are reported here if they occur during execution.
  • Redirection can be used to inform a process or program where to look for input or where to send output.
  • The echo command allows to print text on screen.
  • Input redirection uses the < symbol to have a process read standard input from a file rather than from the keyboard.
  • Output redirection uses the > symbol to redirect output of a command or process to a file rather than to the screen display.
  • File Type Letter Regular File Directory Symbolic Link Named Pipe Socket Device File.
  • All devices are considered a type of file.
  • The more command prints the content of a file (you can also use cat).
  • A file system is a methodology for logically organizing and storing large quantities of data such that the system is easy to manage.
  • A file can be informally defined as a collection of (typically related) data, which can be logically viewed as a stream of bytes (i.e characters).
  • A file is the smallest unit of storage in the Unix file system.
  • A file system consists of files, relationships to other files, as well as the attributes of each file.
  • File attributes are information relating to the file, but do not include the data contained within a file.
  • File attributes for a generic operating system might include a file type (i.e what kind of data is in the file), a file name (which may or may not include an extension), a physical file size, a file owner, file protection/privacy capability, file time stamp (time and date created/modified).
  • File systems provide tools which allow the manipulation of files, provide a logical organization as well as provide services which map the logical organization of files to physical devices.
  • Windows File Names are not Case Sensitive, AAA.txt is the same as aaa.txt.
  • Spaces in filenames create issues when using the command line, use _ instead.
  • Windows File System is organized around drives (C:\ or D:\) and uses the back-slash (\) between folder names.
  • Use the dir command to list the content of the directory, the default is the current directory.
  • Use the type command to print the content of a file.
  • Use the echo command to print text on screen.
  • Use the echo my name is Philippe > command to redirect the output from the screen to a text file (or another command).
  • The Linux file system hierarchy includes the root directory of the entire file system, /bin containing essential command binaries, /boot containing static Boot loader files, /dev containing essential device files, /etc containing host-specific system-wide configuration files, /home containing users' home directories, /lib containing libraries essential for the binaries in /bin and /sbin, /media containing mount points for removable media, /mnt containing temporarily mounted filesystems, /root containing the home directory for the root user, and /sbin containing essential system binaries.
  • Each user has a dedicated home folder, this is the default location at login and is also referred to as ~.
  • The prompt shows you: your login name, the name of the server, your current location, $ sign signalling the system is awaiting a command, and this can be customized by the administrator.