Linux commands
Here are some useful Linux commands:
- ls : list the files in a directory
- ls -l : list the files in a directory with extended information
- rm {file} : remove file {file}
- rm -r {directory} : remove directory {directory} and all files in it
- mv {file} {newfile} : move file {file} to file {newfile}
- cp {file} {newfile} : copy file {file} to file {newfile}
- mkdir : create directory
- rmdir : remove directory
- cd {directory} : move to directory {directory}
- cd (or cd ~) : move to your home directory
- cd .. : move up one directory
- pwd : show your current directory path
- exit : close connection (terminal window)
- grep stringToSearchFor -d directoryPath
- find directoryPath -iname "*caseInsensitivePartOfFileName*"
- ps -ef | grep yourCID :List all your processes on the computer
- tree -L 3 : Print out directory structure
Find other useful Linux commands by doing the following:
info coreutils
info coreutils ls
info coreutils nohup
(exit by typing 'q')
Once you know the name of a command, learn how to use it by:
man command
(exit by typing 'q')
Put a job in background:
CTRL z
bg
List background jobs:
jobs
Put a job in foreground:
fg