What are Linux commands?In: Linux |
Answer
Linux commands are commands entered into a linux terminal (command line interface) and it performs accordingly. For example: if you entered 'pwd' into the terminal prompt and pressed ENTER it would return the current working directory be it /home or /etc
'ls' will list all files and directories the specified directory. If no directory is given, the current one will be used as default.
the best way to learn linux commands is to try them out for yourself which you can via installing linux or downloading a live linux cd, booting into it and type in different commands as a non-root user.
Some typical examples of core linux commands include
- man <command> -- read manual for <command>
- apropos <idea> -- list "man" pages relating to <idea>
- ls -- list files
- cd -- change directory
- pager <files> -- view files
- find <dirs> <pattern> -- find files
- ** find . -name \*txt -- shows all *txt files in current directory and in all subdirectories
- find /etc/ -mtime -24 -- shows all files in /etc and subdirectories that have been modified in the last 24 hours
- find /etc/ -mtime -24 -- shows all files in /etc and subdirectories that have been modified in the last 24 hours
- grep <pattern> <files> -- find files containing text
- ** grep -i 'reload' /etc/init.d/* -- find startup files in /etc/init.d that contain (uppercase or lowercase, thanks to the -i switch) "reload"
- find . -name \*.java | egrep -v 'svn|target' | pager -- find all java files in the current directory and all subdirectories, but don't show (because of the -v switch to egrep) any that contain "svn" or "target" in their path
- find . -name \*.java | egrep -v 'svn|target' | pager -- find all java files in the current directory and all subdirectories, but don't show (because of the -v switch to egrep) any that contain "svn" or "target" in their path
- rm -- remove files
- ps -- list processes
|
|
|
First answer by SubSub. Last edit by Trillich. Contributor trust: 38 [recommend contributor]. Question popularity: 36 [recommend question]
|
Research your answer: |
Can you answer other questions about linux?
|
|


