Linux Tips: 3 quick interesting tip

//Redo last command as Sudo
sudo !!

//Create a super fast RAM disk  πŸ‘
[root@msdlvd-dsnavl02 ~]# mkdir -p /mnt/ram
[root@msdlvd-dsnavl02 ~]# mount -t tmpfs tmpfs /mnt/ram -o size=1024M
[root@msdlvd-dsnavl02 ~]# mkdir /data/ram
[root@msdlvd-dsnavl02 ~]# cd /data/ram
[root@msdlvd-dsnavl02 ram]# dd if=/dev/zero of=test.iso bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 3.00793 s, 349 MB/s
[root@msdlvd-dsnavl02 ram]# rm test.iso
rm: remove regular file ‘test.iso’? y
[root@msdlvd-dsnavl02 ram]# cd /mnt/ram
[root@msdlvd-dsnavl02 ram]# dd if=/dev/zero of=test.iso bs=1M count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1.0 GB) copied, 0.594687 s, 1.8 GB/s


//not in history, don't add your previously ran command in history, leave a leading space before command
 ls -al



Comments

Popular posts from this blog

MongoDB tip: 4 ways to modify replica set configuration

MongoDB Quick Note: BI Connector Issue

MongoDB Tips: Kill long running processes