Delete Isi Dalam File Di Linux OpenSUSE


Untuk cara mendelete isi file misal ada file dengan nama file myresult.txt dan ada isinya sebagai berikut

linux:/home # more myresult.txt 

Starting Nmap 6.47 ( http://nmap.org ) at 2015-04-07 16:50 WIB
Nmap scan report for 192.168.101.1
Host is up (0.047s latency).
MAC Address: 00:1C:25:C9:DF:E4 (Hon Hai Precision Ind. Co.)
Nmap scan report for 192.168.101.2
Host is up (0.047s latency).
MAC Address: 00:18:39:3C:32:00 (Cisco-Linksys)
Nmap scan report for 192.168.101.5
Host is up (0.084s latency).
MAC Address: 98:52:B1:18:54:54 (Samsung Electronics)
Nmap scan report for 192.168.101.17
Host is up (0.10s latency).
MAC Address: F0:7B:CB:4C:98:B9 (Hon Hai Precision Ind. Co.)
Nmap scan report for 192.168.101.21
Host is up (0.11s latency).
MAC Address: 08:3E:8E:28:65:B1 (Hon Hai Precision Ind.Co.Ltd)
Nmap scan report for 192.168.101.27
Host is up (0.010s latency).
MAC Address: 00:22:FB:AA:35:E4 (Intel Corporate)
Nmap scan report for 192.168.101.38
Host is up (-0.082s latency).
MAC Address: F0:6B:CA:C3:59:5C (Samsung Electronics Co.)
Nmap scan report for 192.168.101.43
Host is up (0.092s latency).
MAC Address: E4:F8:EF:0B:12:11 (Unknown)
Nmap scan report for 192.168.101.44
Host is up (0.10s latency).
MAC Address: DC:85:DE:BE:79:95 (Azurewave Technologies.)
Nmap scan report for 192.168.101.51
Host is up (0.0061s latency).
MAC Address: BC:EE:7B:9D:61:73 (Asustek Computer)
Nmap scan report for 192.168.101.55
Host is up (0.065s latency).
MAC Address: 10:C3:7B:39:76:2D (Asustek Computer)
Nmap scan report for 192.168.101.121
Host is up (0.022s latency).
MAC Address: 74:27:EA:D3:F6:18 (Elitegroup Computer Systems Co.)
Nmap scan report for 192.168.101.36
Host is up.
Nmap done: 255 IP addresses (13 hosts up) scanned in 6.96 seconds

Isi file nya bisa di delete menggunakan syntak /dev/null

linux:/home # cat /dev/null > myresult.txt 

Semoga bermanfaat

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s