7 gru 2010

Terminal - polecenia (5)


Coś ostatnio nie miałem dużo wolnego czasu przez grę 'Lara Croft and the guardian of light' (przez coopa) czy też od niedawna Dragon Age: Początek (PS3).
No i też trochę bawiłem się z KDE przy Kubuntu 10.10 ... ale o tym kiedy indziej ;)

Dobra, czas na porcję kolejnych (i ostatnich zarazem) poleceń.

1. Eliminate Rootkit
     sudo rkhunter --checkall

2. Change hostname
     sudo hostname new_name

3. "Tasksel" group software packages into "task"s. You can select a "task" and then install all necessary software packages. It is easy to set up LAMP servers or cloud computing servers.
 -Show all tasks
    tasksel --list
 -Display the extended description of a task
    tasksel --task-desc lamp-server
 -List the packages which are parts of a task
    tasksel --task-packages lamp-server
 -Install/remove a task
    gksudo tasksel

4. Change Process priority
example: renice 5  `pgrep firefox`    
         renice -5 `pgrep wine-server`      
               high <------------------> low
NEW_PRIORITY = -19, -18, -17 [...] 18, 19, 20

5. Clear Bash history
     history -c

6. If you want to use colorful "ls", that is, use colors to distinguish types of files, you can add these lines in $HOME/.bashrc:

if [ "$TERM" != "dumb" ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'

7. $HOME/.thumbnails/ directory is a cache dir GNOME makes when you browse through your folders in nautilus.
It contains thumbnail pictures of picture files you've previously looked at.

8. You can get its total size by
     du -bs $HOME/.thumbnails/

9. You can delete the files in the .thumbnails directory that haven't been accessed for seven days, to free disk space.
find $HOME/.thumbnails/ -type f -atime +7 -exec rm {} \;

10. Capture screen after 10 seconds
       gnome-screenshot -d 10
      Capture current window after 10 seconds
       gnome-screenshot -wd 10

11. Start GConf editor:
       Press Alt+F2, type 'gconf-editor'.

12. Set apt source
       sudo software-properties-gtk
       sudo software-properties-kde

13. Wyświetl pakiety, których już nie ma, ale pozostały ich pliki konfiguracyjne
       dpkg-l | awk '/ ^ rc / (print $ 2)'

14. Add a PPA repository:
       sudo add-apt-repository ppa:PPA-REPOSITORY-NAME

15. Display a list of files. The files are installed from a given package.
       dpkg -L PACKAGE_NAME

16. Display a list of packages. The packages installed a given file.
       dpkg -S FILE_NAME

17. Display a list of packages. The name of packages matches given regex pattern.
       apt-cache search REG_EXPRESSION

18. Display a list of packages. The packages provide a given file.
       apt-file search FILE_NAME

19. Display a list of packages. The given package depends on the list of packages.
       apt-cache depends PACKAGE_NAME

20. Display a list of packages. These packages depend on the given package.
       apt-cache rdepends PACKAGE_NAME

21. Prompt for a disk to be inserted and then add the disc to the source list.
       sudo apt-cdrom add

22. Install the newest versions of all packages currently installed on the system.
       sudo apt-get upgrade

23. Delete residual package configuration files.
       dpkg -l | grep ^rc | awk '{print $2}' | sudo xargs dpkg -P

24. Automatically install necessary files for './configure ; make ; make install'
       sudo auto-apt run ./configure

25. Save the list of packages currently installed on your system.
       dpkg --get-selections | grep -v deinstall > SOME_FILE
      Then use the file to restore packages.
       dpkg --set-selections < SOME_FILE ; sudo dselect

26. After running "sudo apt-get install", "*.deb" files are stored in "/var/cache/apt/archives"
      You can clean this directory by:
       sudo apt-get clean

27. Display URL for a given package
       apt-get -qq --print-uris install PACKAGE_NAME

28. Display some statistics about the apt cache
       apt-cache stats

29. Display all package name
       apt-cache pkgnames

30. Display some information of a given package
       apt-cache show PACKAGE_NAME

Amen :)

0 komentarze:

Prześlij komentarz