21 lis 2010

Terminal - polecenia (3)

Witam.

Dawno nie było nowych poleceń dla Terminala ... więc nadrabiam zaległości :)

1. Changes user fullname, office number, office extension, and home phone number
    information.
     sudo chfn USER_NAME

2. Display user information
     finger USER_NAME

3. Temporarily prevent a user from logging in
     sudo usermod -L USER_NAME

4. Revoke the operation above
     sudo usermod -U USER_NAME

5. Add a user to admin group
     sudo usermod -G admin -a USER_NAME

6. Set the HTTP proxy
     export http_proxy=http://PROXY.DOMAIN.NAME:PORT

7. Modify the information displayed after logging in
     sudo vim /etc/motd.tail

8. Choose the input method for X Window
     im-switch -c

9. Convert the file name from GBK to UTF8
     convmv -r -f gbk -t utf8 --notest FILE_NAME

10. Convert the file content from GBK to UTF8
       iconv -f gbk -t utf8 FILE_NAME

11. Convert tags in '*.mp3' from GBK to UTF8
       find . -name '*.mp3' -execdir mid3iconv -e GBK {} \;

12. Read a long file
       less FILE_NAME

13. Print lines matching a pattern
       grep REG_EXP FILE_NAME

14. Display a list of file name. The files contain a given string.
       grep -lr REG_EXP PATHNAME

15. Display all '.txt' file
       find . -name '*.txt'

16. Create two empty files
       touch file_name_1 file_name_2

17. Create directory. Create parent directories as needed.
       mkdir -p /tmp/a/b/c/d/e

18. Change working directory to the home folder
       cd

19. Change working directory to the previous working directory
       cd -


Może ktoś kiedyś w tym "bełkocie" znajdzie coś co mu się przyda, kto wie ;)

0 komentarze:

Prześlij komentarz