JohnnyO Posted March 11, 2018 Share Posted March 11, 2018 A few aliases to shorten some commands when working with TCAdmin. Creating system aliases for the most used routines saves time. Edit your /root/.bash_aliases file and place the following in that file. root@server ~ # nano /root/.bash_aliases #-- Bash Alias File - March 10, 2018 ------------------------------------------------------------------------------------- # # #-- One Liner Aliases alias tailser='cd /home/tcadmin/Logs/ServiceManager/; tail -f console.log' alias tailmon='cd /home/tcadmin/Logs/Monitor/; tail -f console.log' alias nanotcamon='cd /home/tcadmin/Monitor/; nano TCAdminMonitor.exe.config' # # #-- Function Aliases function tcadebugon() { clear; cd /home/tcadmin/Monitor; ./monitor-service stop; sleep 1; sed -i 's/<add key=\"TCAdmin.Debug\" value=\"False\" \/>/<add key=\"TCAdmin.Debug\" value=\"True\" \/>/g' TCAdminMonitor.exe.config; /bin/chmod 0700 /home/tcadmin; /bin/chown -R tcadmin: /home/tcadmin; sleep 1; ./monitor-service start; } function tcadebugoff() { clear; cd /home/tcadmin/Monitor; ./monitor-service stop; sleep 1; killall mono; sed -i 's/<add key=\"TCAdmin.Debug\" value=\"True\" \/>/<add key=\"TCAdmin.Debug\" value=\"False\" \/>/g' TCAdminMonitor.exe.config; /bin/chmod 0700 /home/tcadmin; /bin/chown -R tcadmin: /home/tcadmin; sleep 1; ./monitor-service start; } then do ... root@server ~ # chmod 0644 /root/.bash_aliases root@server ~ # source ~/.bashrc Now call for one of the aliases in shell by typing its name and hitting the enter key: root@server ~ # tailser root@server ~ # tailmon root@server ~ # nanotcamon root@server ~ # tcadebugon root@server ~ # tcadebugoff If you have a great alias that can help others, post them below and we'll add them to this post! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now