자꾸만 잊어버리네...


tar 묶을때....특정 디렉토리 빼기..


나 같은 경우는 .svn 디렉토리....



tar czvf source_09.tgz source_09/ --exclude .svn


이상...



분할압축~

tar czvf - target(file or directory) | split -b 10m - 생성할파일.tar.gz


SCP - Secure CP


복사 툴...


scp 굳이 nautilus를 실행하지 않고 복사하는 법을 알게 되었다....굳...


manpage를 보니 여러가지 옵션이 많이 있네..


scp - secure copy (remote file copy program)


-P port Specifies the port to connect to on the remote host.....


우선은 포트 정도만 알고 있으면 될 것 같고...소문자 -p는 rcp에서 사용중이라는 말이 있네....


example)

scp src_file myaccount@10.10.10.10:/home/myaccount/   [enter]

myaccount@10.10.10.10's password:

src_file    100%    21MB    10.7MB/s    00:02



-EOF-



도통 모르겠다...

주요 단어들....


리눅스는 지연된 페이지 할당을 사용한다( Deferred page allocation).
낙관적 메모리 할당..(optimistic memory allocation) 웬 철학적인....

chkconfig -ad smb
chkconfig --level 3 on


hdparm

예제만 보려고 했는데...엄청 기네...-_-;;


SYNOPSIS
       find [-H] [-L] [-P] [-D debugopts] [-Olevel] [path...] [expression]


EXAMPLES

       find /tmp -name core -type f -print | xargs /bin/rm -f


       Find  files  named core in or below the directory /tmp and delete them.
       Note that this will work incorrectly if there are  any  filenames  con‐
       taining newlines, single or double quotes, or spaces.

       find /tmp -name core -type f -print0 | xargs -0 /bin/rm -f

       Find  files  named core in or below the directory /tmp and delete them,
       processing filenames in such a way that file or  directory  names  con‐
       taining  single or double quotes, spaces or newlines are correctly han‐
       dled.  The -name test comes before the -type test  in  order  to  avoid
       having to call stat(2) on every file.


       find . -type f -exec file '{}' \;

       Runs  `file'  on  every file in or below the current directory.  Notice
       that the braces are enclosed in single quote marks to protect them from
       interpretation as shell script punctuation.  The semicolon is similarly
       protected by the use of a backslash, though single  quotes  could  have
       been used in that case also.


       find / \
       \( -perm -4000 -fprintf /root/suid.txt %#m %u %p\n \) , \
       \( -size +100M -fprintf /root/big.txt %-10s %p\n \)

       Traverse the filesystem just once, listing setuid files and directories
       into /root/suid.txt and large files into /root/big.txt.


       find $HOME -mtime 0

       Search for files in your home directory which have been modified in the
       last  twenty-four  hours.  This command works this way because the time
       since each file was last modified  is  divided  by  24  hours  and  any
       remainder is discarded.  That means that to match -mtime 0, a file will
       have to have a modification in the past which is  less  than  24  hours
       ago.


       find /sbin /usr/sbin -executable \! -readable -print

       Search for files which are executable but not readable.


       find . -perm 664

       Search  for files which have read and write permission for their owner,
       and group, but which other users can read  but  not  write  to.   Files
       which  meet  these  criteria  but  have other permissions bits set (for
       example if someone can execute the file) will not be matched.


       find . -perm -664

       Search for files which have read and write permission for  their  owner
       and  group, and which other users can read, without regard to the pres‐
       ence of any extra permission bits (for  example  the  executable  bit).
       This will match a file which has mode 0777, for example.


       find . -perm /222

       Search  for files which are writable by somebody (their owner, or their
       group, or anybody else).


       find . -perm /220
       find . -perm /u+w,g+w
       find . -perm /u=w,g=w

       All three of these commands do the same thing, but the first  one  uses
       the  octal  representation  of the file mode, and the other two use the
       symbolic form.  These commands all search for files which are  writable
       by  either  their  owner  or  their  group.  The files don't have to be
       writable by both the owner and group to be matched; either will do.


       find . -perm -220
       find . -perm -g+w,u+w

       Both these commands do the same  thing;  search  for  files  which  are
       writable by both their owner and their group.


       find . -perm -444 -perm /222 ! -perm /111
       find . -perm -a+r -perm /a+w ! -perm /a+x

       These  two  commands both search for files that are readable for every‐
       body ( -perm -444 or -perm -a+r), have at least one  write  bit  set  (
       -perm  /222 or -perm /a+w) but are not executable for anybody ( ! -perm
       /111 and ! -perm /a+x respectively).


       cd /source-dir
       find . -name .snapshot -prune -o \( \! -name *~ -print0 \)|
       cpio -pmd0 /dest-dir

       This command copies the contents of /source-dir to /dest-dir, but omits
       files  and directories named .snapshot (and anything in them).  It also
       omits files or directories whose name ends in ~,  but  not  their  con‐
       tents.  The construct -prune -o \( ... -print0 \) is quite common.  The
       idea here is that the expression before -prune matches things which are
       to  be  pruned.  However, the -prune action itself returns true, so the
       following -o ensures that the right hand side  is  evaluated  only  for
       those  directories  which didn't get pruned (the contents of the pruned
       directories are not even visited, so their  contents  are  irrelevant).
       The  expression on the right hand side of the -o is in parentheses only
       for clarity.  It emphasises that the -print0 action  takes  place  only
       for  things  that  didn't  have  -prune  applied  to them.  Because the
       default `and' condition between tests binds more tightly than -o,  this
       is  the  default anyway, but the parentheses help to show what is going
       on.


       find repo/ -exec test -d {}/.svn -o -d {}/.git -o -d {}/CVS ; \
       -print -prune

       Given the following directory of  projects  and  their  associated  SCM
       administrative   directories,  perform  an  efficient  search  for  the
       projects' roots:

       repo/project1/CVS
       repo/gnu/project2/.svn
       repo/gnu/project3/.svn
       repo/gnu/project3/src/.svn
       repo/project4/.git

       In this example, -prune prevents unnecessary descent  into  directories
       that  have  already  been  discovered  (for  example  we  do not search
       project3/src because we already found project3/.svn), but ensures  sib‐
       ling directories (project2 and project3) are found.


NON-BUGS
       $ find . -name *.c -print
       find: paths must precede expression
       Usage: find [-H] [-L] [-P] [-Olevel] [-D help|tree|search|stat|rates|opt|exec] [path...] [expression]

       This  happens  because  *.c has been expanded by the shell resulting in
       find actually receiving a command line like this:

       find . -name bigram.c code.c frcode.c locate.c -print

       That command is of course not going to work.  Instead of  doing  things
       this  way, you should enclose the pattern in quotes or escape the wild‐
       card:
       $ find . -name \*.c -print


끝.

dd if=/dev/cdrom of=file.iso bs=1024

끝. 
/usr/src/linux-headers-2.6.32-31/include/asm-generic/errno.h


#include <asm-generic/errno-base.h>

#define    EDEADLK               35    /* Resource deadlock would occur */
#define    ENAMETOOLONG    36    /* File name too long */
#define    ENOLCK                 37    /* No record locks available */
#define    ENOSYS                 38    /* Function not implemented */
#define    ENOTEMPTY           39    /* Directory not empty */
#define    ELOOP                   40    /* Too many symbolic links encountered */
#define    EWOULDBLOCK      EAGAIN    /* Operation would block */
#define    ENOMSG                42    /* No message of desired type */
#define    EIDRM                   43    /* Identifier removed */
#define    ECHRNG                44    /* Channel number out of range */
#define    EL2NSYNC             45    /* Level 2 not synchronized */
#define    EL3HLT                 46    /* Level 3 halted */
#define    EL3RST                 47    /* Level 3 reset */
#define    ELNRNG                48    /* Link number out of range */
#define    EUNATCH              49    /* Protocol driver not attached */
#define    ENOCSI                50    /* No CSI structure available */
#define    EL2HLT                51    /* Level 2 halted */
#define    EBADE                 52    /* Invalid exchange */
#define    EBADR                 53    /* Invalid request descriptor */
#define    EXFULL                54    /* Exchange full */
#define    ENOANO              55    /* No anode */
#define    EBADRQC             56    /* Invalid request code */
#define    EBADSLT              57    /* Invalid slot */

#define    EDEADLOCK    EDEADLK

#define    EBFONT        59    /* Bad font file format */
#define    ENOSTR        60    /* Device not a stream */
#define    ENODATA        61    /* No data available */
#define    ETIME        62    /* Timer expired */
#define    ENOSR        63    /* Out of streams resources */
#define    ENONET        64    /* Machine is not on the network */
#define    ENOPKG        65    /* Package not installed */
#define    EREMOTE        66    /* Object is remote */
#define    ENOLINK        67    /* Link has been severed */
#define    EADV        68    /* Advertise error */
#define    ESRMNT        69    /* Srmount error */
#define    ECOMM        70    /* Communication error on send */
#define    EPROTO        71    /* Protocol error */
#define    EMULTIHOP    72    /* Multihop attempted */
#define    EDOTDOT        73    /* RFS specific error */
#define    EBADMSG        74    /* Not a data message */
#define    EOVERFLOW    75    /* Value too large for defined data type */
#define    ENOTUNIQ    76    /* Name not unique on network */
#define    EBADFD        77    /* File descriptor in bad state */
#define    EREMCHG        78    /* Remote address changed */
#define    ELIBACC        79    /* Can not access a needed shared library */
#define    ELIBBAD        80    /* Accessing a corrupted shared library */
#define    ELIBSCN        81    /* .lib section in a.out corrupted */
#define    ELIBMAX        82    /* Attempting to link in too many shared libraries */
#define    ELIBEXEC    83    /* Cannot exec a shared library directly */
#define    EILSEQ        84    /* Illegal byte sequence */
#define    ERESTART    85    /* Interrupted system call should be restarted */
#define    ESTRPIPE    86    /* Streams pipe error */
#define    EUSERS        87    /* Too many users */
#define    ENOTSOCK    88    /* Socket operation on non-socket */
#define    EDESTADDRREQ    89    /* Destination address required */
#define    EMSGSIZE    90    /* Message too long */
#define    EPROTOTYPE    91    /* Protocol wrong type for socket */
#define    ENOPROTOOPT    92    /* Protocol not available */
#define    EPROTONOSUPPORT    93    /* Protocol not supported */
#define    ESOCKTNOSUPPORT    94    /* Socket type not supported */
#define    EOPNOTSUPP    95    /* Operation not supported on transport endpoint */
#define    EPFNOSUPPORT    96    /* Protocol family not supported */
#define    EAFNOSUPPORT    97    /* Address family not supported by protocol */
#define    EADDRINUSE    98    /* Address already in use */
#define    EADDRNOTAVAIL    99    /* Cannot assign requested address */
#define    ENETDOWN    100    /* Network is down */
#define    ENETUNREACH    101    /* Network is unreachable */
#define    ENETRESET    102    /* Network dropped connection because of reset */
#define    ECONNABORTED    103    /* Software caused connection abort */
#define    ECONNRESET    104    /* Connection reset by peer */
#define    ENOBUFS        105    /* No buffer space available */
#define    EISCONN        106    /* Transport endpoint is already connected */
#define    ENOTCONN    107    /* Transport endpoint is not connected */
#define    ESHUTDOWN    108    /* Cannot send after transport endpoint shutdown */
#define    ETOOMANYREFS    109    /* Too many references: cannot splice */
#define    ETIMEDOUT    110    /* Connection timed out */
#define    ECONNREFUSED    111    /* Connection refused */
#define    EHOSTDOWN    112    /* Host is down */
#define    EHOSTUNREACH    113    /* No route to host */
#define    EALREADY    114    /* Operation already in progress */
#define    EINPROGRESS    115    /* Operation now in progress */
#define    ESTALE        116    /* Stale NFS file handle */
#define    EUCLEAN        117    /* Structure needs cleaning */
#define    ENOTNAM        118    /* Not a XENIX named type file */
#define    ENAVAIL        119    /* No XENIX semaphores available */
#define    EISNAM        120    /* Is a named type file */
#define    EREMOTEIO    121    /* Remote I/O error */
#define    EDQUOT        122    /* Quota exceeded */

#define    ENOMEDIUM    123    /* No medium found */
#define    EMEDIUMTYPE    124    /* Wrong medium type */
#define    ECANCELED    125    /* Operation Canceled */
#define    ENOKEY        126    /* Required key not available */
#define    EKEYEXPIRED    127    /* Key has expired */
#define    EKEYREVOKED    128    /* Key has been revoked */
#define    EKEYREJECTED    129    /* Key was rejected by service */

/* for robust mutexes */
#define    EOWNERDEAD    130    /* Owner died */
#define    ENOTRECOVERABLE    131    /* State not recoverable */

#define ERFKILL        132    /* Operation not possible due to RF-kill */

#endif




/usr/src/linux-headers-2.6.32-31/include/asm-generic/errno-base.h








    # dd if=/dev/cdrom of=/tmp/foo.iso

 
참고 링크...

http://forum.falinux.com/zbxe/?document_srl=461805


ppm 만들기 요약 

sudo apt-get install netpbm

1. $pngtopnm source.png | pnmtoplainpnm > source.ppm
2. $pnmquant -fs 223 source.ppm > source_256.ppm
3. $pnmnoraw source_256.ppm > source_logo.ppm

끝. 

+ Recent posts