-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlinux-command.txt
More file actions
54 lines (40 loc) · 1.29 KB
/
linux-command.txt
File metadata and controls
54 lines (40 loc) · 1.29 KB
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
54
# Combine data sets
cat ~ ~ > ~
paste ~ ~ > ~
# Numbering by cat command
cat -n ~
cat -b ~ (don’t include blank lines)
# Delete blank lines
sed '/^$/d' ~
sed '/^[[:blank:]]*$/d' ~ # including tab and space
# For tar.gz file
# Compression
tar -zcvf xxxx.tar.gz directory
# Decompression
tar -zxvf xxxx.tar.gz
# Don't kill the background job even if the ssh connection killed
nohup ~
# Check the file size
du
# Check the differences between two files
diff xxx0.txt xxx1.txt (-q: only differ or not, -s: only identical or not)
# Find files
find . -name 'xxxx'
# Count files or directories
find /xxxx/ -type f | wc -l
find /xxxx/ -type d | wc -l
# Delete a managed file
git rm [file neme]
# Delete a latest commit
git reset --hard HEAD^
# Install a library by anaconda
~/.pyenv/versions/anaconda[version]/bin/anaconda search -t conda [library name]
~/.pyenv/versions/anaconda3-4.0.0/bin/anaconda show [library name]
if we searched pyquery, we may get "conda install --channel https://conda.anaconda.org/auto pyquery" then write as below.
~/.pyenv/versions/anaconda-4.0.0/bin/conda install --channel https://conda.anaconda.org/auto pyquery
# Uninstall a library by anacodna
conda uninstall [library name]
# Update a library by anaconda
conda upgrade [library name]
# Open tensorboard
tensorboard --logdir=~