Useful shortcuts for vi editor

Monday, 22 August 2016

How to run a command remotely?

e.g.
psExec \\10.10.10.10 cmd /c calc.exe
psExec \\10.10.10.10 cmd.exe /c msg * 'merhaba'

Note: You can take psExec tool from microsoft site

Wednesday, 17 August 2016

How to run a command as different Windows user?

e.g.
Press "Windows button" -> Type "cmd" -> shift key + right mouse click -> click "Run as different user"

Tuesday, 2 August 2016

How to mount devices at startup by /etc/fstab and /etc/rc.d/rc.local for RedHat distro?

-> define uuid for connected devices
ls -l /dev/disk/by-uuid/

-> add related info into /etc/fstab
e.g.
UUID=1111 /alper/sdb1 ext3 defaults,nobootwait 0 0

-> if this cannot mount the path, you may deal with network issues. To fix it, you should add following command into /etc/rc.d/rc.local config file.
mount -a

extra info: -> If you use 1 1 instead of 0 0 for priority option, you may encounter "maintenance mode" problem. To fix it, run this command
mount -o rw, remount /