Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1.3: The command to print out hello with the newline is: echo -n hello
- I found this out by typing 'man echo', and searching through the command list.
- 1.4: Ctrl+A moves to the beginning of a line, Ctrl+E moves to the end of the line, and Ctrl+U clears the line and
- moves to the start.
- 1.5: Ctrl+L clears the screen, Ctrl+D exits the terminal.
- 2.1: The cat command can be used to view a file in your terminal and concatenate files. The diff command is used
- to view the difference between two files.
- 2.2: To view all txt files you would use the command ls *.txt, to show all hidden files you would use the command
- ls -a.
- 3.1: You can use the curl command to download files from the internet. For example 'curl -OL cdn.learnenough.com/sonnets.txt'.
- This is using curl to retrieve the file, with the option -OL meaning it will save the file with the same name as the source,
- and if the server indicates the file location has changed, curl will reattempt to fetch the file from the new location.
- 3.3: Two commands you can use in conjunction with less are /<string> to find a string within a file, and 'G' to move to the end
- of a file.
- 3.4: You can use grep to search for a substring in a file with grep <string> <file>. You could also use grep to filter through
- processes to find some you want. For example, 'ps aux | grep server' would give a list of server processes.
Add Comment
Please, Sign In to add comment