728x90
반응형
728x90
반응형

 

현재 디렉토리 파일 혹은 디렉토리 목록 보기

 

현재 디렉토리 파일목록보기

  • ls -al
  • ll

 

현재 디렉토리 시간순으로 보기

  • ls -alt
728x90
반응형
728x90
반응형

 

리눅스 파일 폴더 복사하기

  • 파일 복사하기
  • 디렉토리 복사하기

 

 

1) 파일 복사하기

cp [파일위치/파일이름.txt] [목적지파일위치/파일이름.txt]

ex) example디렉토리 밑에 test.txt파일을 tmp디렉토리 밑으로 복사하기

cp example/test.txt tmp

cp ./test.txt tmp    (현재 example 디렉토리 안에 있을 경우)

 

 

2) 디렉토리 안 모든 파일 복사하기

cp -r * [현재경로기준으로 옮기고 싶은 디렉토리안에 복사하기]

ex) 현재 디렉토리는 (a/b)

a 디렉토리 밑에 있는 b에서

a 디렉토리 밑에 있는 c디렉토리 밑으로 이동하기

cp -r * ../c

 

 

3) 디렉토리 복사하기

cp -r [디렉토리명] [목적지 디렉토리위치]

ex) example 디렉토리내에 있는 temp 디렉토리를

    example 디렉토리내에 있는 다른 tmp 디렉토리 밑으로 복사하기

cp -r temp tmp (현재 example디렉토리 안에 있을 경우)

 

 

 

 

 

728x90
반응형
728x90
반응형

 

 

Linux 파일 정보

  • 파일(-), 디렉토리(d)를 구분
  • 사용자/그룹/기타
  • rwx 3자리씩 2진수 > 10진수로 계산한 결과 : 111 > 7     101 > 5

 

 

-rwxr-xr-x  >> 파일 / 사용자권한7 / 그룹권한5 / 기타권한5

읽기 권한(r) : 파일수정 불가, 파일 열기, 복사가능

쓰기 권한(w) : 파일 내용 추가 가능, 읽기 권한 있을시 편집 가능

실행 권한(x)프로그램 파일이나 쉘 스크립트 파일등에 부여

 

 

현재 디렉토리에 존재하는 파일 권한 부여하기

chmod 755 ./[파일이름]

ex) test.sh 파일에 755 권한 부여하기

chmod 755 ./test.sh

728x90
반응형
728x90
반응형

 

 

tar, tar.gz 압축 및 압축해제 방법

  • .tar 압축하기
  • .tar 압축 해제하기
  • .tar.gz 압축하기
  • .tar.gz 압축 해제하기 

 

1) .tar로 압축하기

tar -cvf [파일명.tar] [폴더명]

ex) test라는 폴더를 temp.tar로 압축하기

> tar -cvf temp.tar test

 

 

2) .tar 압축 해제하기

tar -xvf [파일명.tar]

ex) temp.tar라는 tar파일 압축풀기

tar -xvf temp.tar

 

 

3) .tar.gz로 압축하기

tar -cvfz [파일명.tar.gz] [폴더명]

ex) test라는 폴더를 temp.tar.gz로 압축하기

tar -cvfz temp.tar.gz test

 

 

4) .tar.gz로 압축 해제하기

tar -xvfz [파일명.tar.gz]

ex) temp.tar.gz라는 tar.gz파일 압축풀기

> tar -xvfz temp.tar.gz

728x90
반응형
728x90
반응형

 

Eclipse Properties File 글자 색상 변경하기

 

Eclipse상단 메뉴 > Window > Preferences > PropertiesEditor > Editor     OR

Eclipse상단 메뉴 > Window > Preferences > Properties Files Editor > Editor 

 

2개중 맞는 메뉴로 이동 후 색깔 변경하기

728x90
반응형
728x90
반응형

 

Eclipse 테마 수정 안될 때 강제 변경하기

 

이클립스 테마 다운로드 주소 : http://www.eclipsecolorthemes.org/

 

1. 이클립스 테마 다운로드 주소링크를 타고 홈페이지 접속 

 

2. 원하는 테마 선택

 

3. Eclipse Preferences (EPF) 클릭 해서 다운로드 하기

 

4. 이클립스 실행

 

5. 이클립스 > File > Import > General > Preferences 클릭

 

6. Browse... 클릭 후 다운로드 파일 적용하고 Finish

 

 

728x90
반응형
728x90
반응형

 

JSP파일에서

  • JS 파일 Import 하기
  • CSS 파일 Import 하기
  • JSP 파일 Import 하기

 

JS 파일 Import 하기

1
2
3
4
5
js 파일 Import 방법 1
<script src="<c:url value='/js파일경로'/>" type="text/javascript"></script>
 
js 파일 Import 방법 2
<script src="/js파일경로" type="text/javascript"></script>
 

 

CSS 파일 Import 하기

1
2
3
4
5
Css 파일 Import 방법 1
<link type="text/css" rel="stylesheet" href="<c:url value='/css파일경로'/>" ></link>
Css 파일 Import 방법 2
<link type="text/css" rel="stylesheet" href="/css파일경로" ></link>
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter

 

JSP파일에서 다른 JSP 파일 Import 하기

1
2
3
다른 JSP 파일 Import 방법
<%@include file="/WEB-INF/jsp파일경로"%>
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
728x90
반응형

'Web > JSP' 카테고리의 다른 글

[JSP] JSTL forEach Example  (0) 2019.07.07
[JSP] JSTL if, when, otherwise Example  (1) 2019.07.07
[JSP] JSTL Tag 사용 Error  (0) 2019.07.07
728x90
반응형

 

JSTL 문법 forEach 알아보기

0 ~ 5 까지 출력하기 (default step = 1)

1
2
3
4
5
6
<c:forEach var="index" begin="0" end="5">
    ${index }
</c:forEach>
 
실행 결과 : 0 1 2 3 4 5
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter

 

0 ~ 5 까지 출력하기 (step = 2)

1
2
3
4
5
6
<c:forEach var="index" begin="0" end="5" step="2">
    ${index }
</c:forEach>
 
실행 결과 : 0 2 4
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter

 

리스트 순차적으로 사용하기

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<c:set var="index" value="0,1,2" />
    <c:forEach items="${index }" var="temp">
        <p>인덱스 : ${temp }<p>
</c:forEach>
 
실행결과
-----------------------
인덱스 : 0
 
인덱스 : 1
 
인덱스 : 2
-----------------------
 
http://colorscripter.com/info#e" target="_blank" style="color:#4f4f4ftext-decoration:none">Colored by Color Scripter
728x90
반응형

'Web > JSP' 카테고리의 다른 글

[JSP] js, css import example  (0) 2019.07.07
[JSP] JSTL if, when, otherwise Example  (1) 2019.07.07
[JSP] JSTL Tag 사용 Error  (0) 2019.07.07

+ Recent posts