Useful Linux commands
General
ssh into server
display manual for myprogram
display help file for myprogram
go to home directory
navigate to some_path under your home directory
show current directory path
print out permissions octal notation for myfile.txt
change permissions on myfile.txt
change group of myfile.txt to group
change owner and group of myfile.txt
list files, display human readable and sort by time
calculate size of folder foo and its subfolders
search for the word foo in the output of ls
display number of matches to the word foo
find files matching a string
search recursively in files for "my phrase" (case insensitive) where file names match "*.txt" and list matching file name and line number of each result
copy myfile.txt
rename myfile.txt to myfile2.txt
move myfile.txt one directory below and rename it
forcibly remove all files and directories recursively starting at current location
search for "my phrase" in all files starting at current location
search for "my phrase" in all files and subdirectories starting at the current location
list all files contained in mydir starting with the word foo
show all running processes with java somewhere in the process string
kill running process 1234
show where apache is installed
show version number of apache
display location of files related to apache
display network settings
transfer a local file to another machine
transfer a file from another machine to my machine
decompress a tar file that was compressed with gzip
download myfile.txt from foo.com
run myprogram
vim
create a new file or open an existing called myfile.txt
search for "foo"
show next result
move to bottom of document
enter insert/edit mode
return to default view mode
quit
quit and don't save
write and quit
sql
login to sql using username "root" and password "root123"
list available databases
load database "foo"
list tables in database
show structure of table "bar"
display number of records in "bar"
- Printer-friendly version
- Login or register to post comments