Category archives: Notes

RSS feed of Notes

linux bash shell command aliases Command substitution globbing

linux bash shell command aliases Command substitution globbing

1.bash shell command aliases:

##### alias CMDALIAS = 'COMMAND [options] [arguments]'
##### Shell aliases defined only valid in the current shell life cycle; effective range of only the current    shell process alias:
 eg. [root@levi ~]# alias cls=clear
Cancel command aliases:
[root@levi ~]#unalias CMDALIAS
the same alias command ...

Continue reading

jQuery plugin - Cookie plug jquery.cookie.js

jQuery Cookie Download:

1. The introduction of jquery.cookie.js

<Script src = "scripts/jquery-1.6.4.js" type = "text/javascript"> </script>
<Script src = "scripts/jquery.cookie.js" type = "text/javascript"> </script>

2. Use

1) add a new session cookie:
$.cookie ...

Continue reading

linux help command Summary notes

Linux help command : help,--help,man,info

type command : View command type(Internal Command,External Command)
[root@levi ~]# type -a cd 
cd is a shell builtin (Internal Command)

[root@levi ~]# type -a grep 
 grep is /bin/grep    ( External Command)
1.Internal Command (Help view)
2.External Command (help view)
COMMAND --help
3 ...

Continue reading

linux c library function to read binary file code

linux c library function to read binary file code

struct person
    int id;
    char name[20];
    int age;
    int sex;
    char tel[20];

int main(int arg, char *args[])
    FILE *p = fopen(args[1], "w");
    if (p == NULL)
        printf("error is %s\n", strerror(errno));
    } else
        struct person man;
        memset(&man, 0 ...

Continue reading

Linux command history

[root@linux ~]# history [n]
[root@linux ~]# history [-c]
[root@linux ~]# history [-raw] histfiles


-n  :number, meaning ' the n command to list the most recent list ' means!

-c  :All the history in the current shell delete all content

-a  :Will be added into the history currently added instruction in histfiles, if not histfiles, then the ...

Continue reading