Hard drive speed test using Linux command line and hdparm

Note that all tests should be run multiple times and average time should be calculated to get more accurate result.

Bypassing hard drive’s buffer cache memory thus reading directly from the disk.

Read data from the second half of the disk that is if the hard drive size is 100GB.

To obtain cached reads run the following command:

Tcpdump Best Practices

List of interfaces on which tcpdump can listen:


Listen on interface eth0:

Listen on any available interface :

Be verbose while capturing packets:

More verbose while capturing packets:

Very verbose while capturing packets:

Verbose and print the data of each packet in both hex and ASCII, excluding the link level header:

Verbose and print the data of each packet in both hex and ASCII, also including the link level header:

Less verbose (than the default) while capturing packets:

Limit the capture to 100 packets:

Record the packet capture to a file called capture.cap:

Record the packet capture to a file called capture.cap but display on-screen how many packets have been captured in real-time:

Display the packets of a file called capture.cap:

Display the packets using maximum detail of a file called capture.cap:

Display IP addresses and port numbers instead of domain and service names when capturing packets

Capture any packets where the destination host is 192.168.5.1. Display IP addresses and port numbers:

Capture any packets where the source host is 192.168.5.1. Display IP addresses and port numbers:

Capture any packets where the source or destination host is 192.168.5.1. Display IP addresses and port numbers:

Capture any packets where the destination network is 192.168.5.0/24. Display IP addresses and port numbers:

Capture any packets where the source network is 192.168.1.0/24. Display IP addresses and port numbers:

Capture any packets where the source or destination network is 192.168.5.0/24. Display IP addresses and port numbers:

Capture any packets where the destination port is 23. Display IP addresses and port numbers:

Capture any packets where the destination port is is between 1 and 1023 inclusive. Display IP addresses and port numbers:

Capture only TCP packets where the destination port is is between 1 and 1023 inclusive. Display IP addresses and port numbers:

Capture only UDP packets where the destination port is is between 1 and 1023 inclusive. Display IP addresses and port numbers:

Capture any packets with destination IP 192.168.1.1 and destination port 23. Display IP addresses and port numbers:

Capture any packets with destination IP 192.168.5.1 and destination port 80 or 443. Display IP addresses and port numbers:

Capture any ICMP packets:

Capture any ARP packets:

Capture either ICMP or ARP packets:

Capture any packets that are broadcast or multicast:

Capture 500 bytes of data for each packet rather than the default of 68 bytes:

Capture all bytes of data within the packet:

 

Linux Sound Card HDMI problems

1.  How can I change the default audio device from command line?

  • Normally Gui of Ubuntu allows you to do that  (System->Preferences->Sound), like the default input/output device and setting the volume.

      If that not works

2. Use The AlsaMixer 

kutayzorlu.com alsamixer HDMI configuration

F1 – Help
F2 – System Information
F6 – Select Sound Card
Esc – Exit the menu

3. Show the all of the sound devices 

Other Option list cards

4. Change it from GRUB

5. Change the config files and test it by Command Line

Reconfigure again for sound-base

 

Restart PC test again,  It works on my pc.

This test is very important to find which sound card you need to use,   1, and 3   is important  first is  Device  other is  port.

 

 

 

 

 

 

 

davfs2 Mount System : WebDAV (mount, umount, etc.)

Web Distributed Authoring and Versioning (WebDAV), an extension to the HTTP-protocol,
allows authoring of resources on a remote web server.

davfs2 provides the ability to access such resources like a typical filesystem,
allowing for use by standard applications with no built-in support for WebDAV.
davfs2 is designed to fully integrate into the filesystem semantics of Unix-like systems (mount, umount, etc.).
davfs2 makes mounting by unprivileged users as easy and secure as possible.
davfs2 does extensive caching to make the file system responsive, to avoid unnecessary network traffic
and to prevent data loss, and to cope for slow or unreliable connections.
davfs2 will work with most WebDAV servers needing little or no configuration.
davfs2 is developed and tested on GNU/Linux but porting to other free operating systems should not be too cumbersome.

 

Projects That OneDrive Supports

  • DAVFS2 via WebDAV Protocol savannah.nongnu.org/projects/davfs2 WebDAV is a file transfer protocol using HTTP, OneDrive uses WebDAV under the hood Not natively
  • Program  : If you have OneDrive Personal, using DAVFS2 might be the cleanest option. You will see it using your file manager straight away and it will act pretty much like a normal network drive. Firstly, find out what your HTTPS WebDAV address should be (found HERE).  You can either add an entry to your /etc/fstab (so that it is mounted on startup every time – recommended), or you can use GNOME Nautilus/Files (or KDE Konqueror) to mount it.
    • Fstab : https://cid-kutayzorlu.com.users.storage.live.com/items/blablabla /home/media/MS davfs user,noauto,file_mode=600,dir_mode=700 0 1
    • Make sure davfs2 is instaled on your machine before you do this obviously!

 

 

Ref: http://savannah.nongnu.org/projects/davfs2
rkz

Introduction to if

reference: http:// tldp.org / LDP/Bash-Beginners-Guide/html/sect_07_01.html

bash comparison

Reference: http://www.tldp.org/LDP/abs/html/comparison-ops.html

 

 

 

#+ 
http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_02.html