본문 바로가기

OS/Linux

vi editor setting file The first thing to do here is check for the presence of a .exrc file in your home directory. You can do this by typing: % cd % ls .exrc If the file is NOT present, you will get a message saying: .exrc: No such file or directory. You would then need to create and modify the file with the appropriate commands. Type the following: % echo 'set tabstop=4' > .exrc % echo 'set shiftwidth=4' >> .exrc If.. 더보기
Accessing Files cat cat file1 : display contents of file1 cat > file1: type in, Ctrl+D to end type more : display contents with separate pages more file1 head : display from the top of the file by number option tail : display from the bottom of the file by number option 더보기
Managing Files touch : create empty files touch file1 file2 file3 ... ls : display a list of all files in your current directory or folder ls file* : using a wildcard symbol to match multiple files ls -l file*: long list ls -a : to view both hidden files(filenames beginning with a period) and non-hidden files cp file1 file4 :copy file1 to file4 mv [source file] [destination file] : move file to a new name 더보기
online Manual man -k keyword : display all keyword related commands 더보기
Redirection; Piping; File Name Expansion Redirection Standard Input, Output, and Error standard input, output, and error for commands are sent to your terminal, unless they are redirected cat - (by itself) will take input from terminal (use control-d to end input), send output and error messages to terminal > will redirect standard output to a file, deleting any existing contents of the file cat > temp - will redirect output to a file .. 더보기
Permissions chmod is used to alter access permissions to an existing file or directory read/write/execute for user(owner)/group/other chmod xxx filename xxx is 3 octal digits representing the binary string rwxrwxrwx where the first three characters are read/write/execute permission for the user, the next three for the user's group, and the last three for all others eg. chmod 640 file1 - would give the user .. 더보기
Common Commands pwd will show your current directory cd is used to change current directory, eg. cd directory-name ls - lists information about files and directories ls -a - all files (including hidden) ls -l - long form, gives more information about files ls -d - gives information about the directory itself, not contained files these options can be mixed and matched, eg. ls -ld mkdir - to create directories mk.. 더보기
[Linux] Date&Time with Windows for DualBooting Goto your linux system. Goto System > Administration > Date and Time > Time Zone. Below this, you may see a check box telling about some UTC and stuff! Uncheck it. Close and reset your system time and date! Tada! Everything will work fine from now! 더보기
Change Windows and Linux Boot string in Linux sudo gedit /boot/grub/menu.lst 더보기