$ ls
testdir/ testfile
$ cp testfile1 testfile_cp
$ ls
testdir/ testfile testfile_cp
# 폴더 복사
$ cp -r testdir testdir_cp
$ ls
testdir/ testdir_cp/ testfile testfile_cp
출력 : cat 파일명
파일 합치기 : cat 파일명1 파일명2 > 파일명3
파일 내용 덧붙이기 : cat 파일명1 >> 파일명2
$ ls
file1 file2 file3
$ cat file1
1
$ cat file2
2
$ cat file3
3
$ cat file1 file2 > file1_2
$ ls
file1 file1_2 file2 file3
$ cat file1_2
1
2
$ cat file1 >> file2
$ cat file2
2
1
$ cat > file4
hello
world
(작성이 끝나면 ctrl +d 로 파일 저장)
$ cat file4
hello
world
출력해주는 숫자를 지정할수 있습니다.
$ cat testfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$ head -3 testfile
1
2
3
$ head -3 testfile
1
2
3
brew install tree
# depth 만 표시
tree -L 2 -N
# depth 와 directory 만 표시
tree -L 2 -d -N
# depth , directory only , no indentation + full path
tree -L 2 -d -fi -N
# depth , 특정 폴더 제외
tree -N -L 2 -d -I "node_modules | tests"