forked from kyclark/command-line-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ideas.txt
53 lines (53 loc) · 3.26 KB
/
ideas.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
whoami: reports your username
w: shows who is currently on a system
man: show the manual page for a command
echo: say something
cowsay: have a cow say something
env: print your environment
printenv: print some/all of your environment
which/type: tells you the location of a program
touch: create an empty regular file
file: briefly describe a file or directory
pwd: print working directory, where you are right now
ls: list files in current directory
find: find files or directories matching some conditions
locate: find files using a database, requires daemon to run
cd: change directory (with no arguments, `cd $HOME`)
cp: copy a file (or "cp -r" to copy a directory)
mv: move a file or diretory
mkdir: create a directory
rmdir: remove a directory
rm: remove a file (or "rm -r" to remove a directory)
cat: concatenate files (cf. [http://porkmail.org/era/unix/award.html](http://porkmail.org/era/unix/award.html))
column: arrange text into columns
paste: merge lines of files
sort: sort text or numbers
uniq: remove duplicates _from a sorted list_
sed: stream editor for altering text
awk/gawk: pattern scanning and processing language
grep: global regular expression program (maybe?), cf. [https://en.wikipedia.org/wiki/Regular\_expression](https://en.wikipedia.org/wiki/Regular_expression)
history: look at past commands, cf. CTRL-R for searching your history directly from the command line
head: view the first few (10) lines of a file
tail: view the last (10) lines of a file
comm: find lines in common/unique in two sorted files
top: view the programs taking the most system resources (memory, I/O, time, CPUs, etc.), cf. "htop"
ps: view the currently running processes
cut: select columns from the output of a program
wc: (character) word (and line) count
more/less: pager programs that show you a "page" of text at a time; cf. [https://unix.stackexchange.com/questions/81129/what-are-the-differences-between-most-more-and-less/81131](https://unix.stackexchange.com/questions/81129/what-are-the-differences-between-most-more-and-less/81131)
bc: calculator
df: report file system disk space usage; useful to find a place to land your data
du: report disk usage; recommend "du -shc"; useful to identify large directories that need to be removed
ssh: secure shell, like telnet only with encryption
scp: secure copy a file from/to remote systems using ssh
rsync: remote sync; uses scp but only copies data that is different
ftp: use "file transfer protocol" to retrieve large data sets (better than HTTP/browsers, esp for getting data onto remote systems)
ncftp: more modern FTP client that automatically handles anonymous logins
wget: web get a file from an HTTP location, cf. "wget is not a crime" and Aaron Schwartz
\|: pipe the output of a command into another command
>, >>: redirect the output of a command into a file; the file will be created if it does not exist; the single arrow indicates that you wish to overwrite any existing file, while the double-arrows say to append to an existing file
<: redirect contents of a file into a command
nano: a very simple text editor; until you're ready to commit to vim or emacs, start here
md5sum: calculate the MD5 checksum of a file
diff: find the differences between two files
xargs: take a list from one command, concatenate and pass as the arguments to another command