Linux Commands 2
True or False: The 'apropos' command is a tool that searches through manual pages for keywords.
True
True or False: The 'nano' text editor shows you the hotkeys that work in the program.
True
True or False: To exit 'vim' you must first exit insert mode.
True
True or False: The commands :x and :wq do the same thing in 'vim'.
True (They both save and exit)
True or False: The 'wget' command is used to download files over HTTP/S.
True (wget stands for web get)
How do you save in vim?
:q! or :q (:wq or :x will save and quit)
True or False: The 'file' command uses the file extension to determine the type of a file.
False (It uses the file header, not the file extension.)
True or False: The 'strings' command will only ever print valid strings.
False (The 'strings' command will interpret everything as a string and print it if the string is longer than a certain number of characters. That doesn't mean it was originally intended to be a string.)
True or False: The grep command needs to be combined with 'cat' to search the contents of a file.
False (It's common for people to combine the two, but it is totally unnecessary. Grep can search within files on its own)
What does the Linux which command do?
This can show you where in your PATH a tool is installed.
What does the Linux command file do?
This can tell us the filetype of a file. This reads the file header of the file and comapres it against a database of file headers.
What does the Linux command vim do?
This command is a text editor, it is much more powerful than nano. In order to start typing you need to enter insert mode by typing i. To exit insert mode hit CTRL + C.
What does the Linux command strings do?
This command is used for pulling text sequences out of binary files.
What does the Linux command grep do?
This is a command-line tool used to search for a string of characters in a specified file. When it finds a match, it prints the line with the result. By default grep is case-sensitive (you can make it insensitive by using the -i parameter)
What does the Linux command apropos do?
This is used to search man pages for keywords, usually to find the appropriate tool to use in a particular situation.
What does the Linux command wget do?
This stands for web get and it allows us to download files from the internet from the command line.
What does the Linux command nano do?
This tool is a command-line based text editor. To edit a file you just run ____ on the filename that exists. To exit we just hit CTRL + X
True or False: An 'ELF' file is a type of executable file.
True
True or False: If you run 'which' against a command and nothing comes up, it is likely the program is not in your PATH.
True
When you start 'vim', before you can type you must first enter insert mode by pressing...
i