27 lis 2010

Terminal - polecenia (4)


Oto kolejna porcja poleceń dla Terminala ...

1. Display hidden files
     ls -a

2. Copy directory. Preserve links, file mode, ownership, timestamps.

3. Determine file type
     file FILE_NAME

4. Output the last 6 lines
     tail -n 6 FILE_NAME

5. Copy files via SSH

6. Rename '*.rm' files to '*.rmvb' files
     rename 's/.rm$/.rmvb/' *

7. Change the file name to lowercase
     rename 'tr/A-Z/a-z/' *

8. Display subdirectories in current directory
     ls -d */.

9. Display file number in current directory
     ls . | wc -w

10. Extract "*.gz" file
       gunzip FILE_NAME.gz
      Extract "*.tar.gz" file
       tar zxf FILE_NAME.tar.gz
      Extract "*.tar.bz2" file
       tar jxf FILE_NAME.tar.bz2

11. Do compression
       tar czf FILE_NAME.tar.gz FILE1 FILE2 FILE3
       tar cjf FILE_NAME.tar.bz2 FILE1 FILE2 FILE3

12. Displays a calendar
       cal MONTH YEAR

13. Set the date and time via NTP
       sudo ntpdate ntp.ubuntu.com

14. Poweroff your computer
       sudo halt
       sudo shutdown -h now
      Poweroff your computer in 23:00
       sudo shutdown -h 23:00
      Poweroff your computer after 60 minutes
       sudo shutdown -h +60

15. Reboot your computer
       sudo reboot
       sudo shutdown -r now

16. If you want some program to start up automatically, please put '.desktop' files into '$HOME/.config/autostart'

17. You can configure "preferred applications" by this file "$HOME/.local/share/applications/mimeapps.list"

18. Continuously monitor the memory usage
       watch -d free

19. Display HTTP HEAD response
       w3m -dump_head http://example.com

20. Display file content with line number
       nl FILE_NAME

To tyle ... na razie :)

0 komentarze:

Prześlij komentarz