• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Log editor in unix...It is hard to drag

 
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am login into linux machine via putty and have sudo access.

Any small tool can be allowed to install and not bigger one

Can someone let me know any tool which can be installed in command line which has gui or gui kind of UI in linux with scroll.

Note: Linux doesn't have UI

Thanks
 
Saloon Keeper
Posts: 28327
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure what that means. I think if you just want to be able to scroll up and down in the PuTTY window, the page up/page down keys will do that. If you're looking for a particular GUI app, then there's a problem.

Linux and Unix implement their GUIs using the X Window system as their basis. Unlike Microsoft Windows, X is not welded into the operating system core. It's an optional feature that has to be installed.

The good news is that X differs from Microsoft Windows in that it doesn't demand that the GUI be directly attached to the computer that's running the apps. Or to be more precise, X is split into client and server parts.

Here's the weird part: the remote computer is the X client and the local user is the X server.. They communicate via TCP/IP port 6000.

There is one problem, though. I know of no free or open-source X servers for Microsoft Windows. It's possible that WSL provides an X server and I would actually hope so, but I'm not familiar with the fine points of WSL or for that matter, its licensing.

However, if you can get an X server for your Windows system, it's relatively easy to run remote GUI sessions. There are a few PuTTY command options needed to open the X channel, but it's not that hard. You do have to have X installed on the remote machine also, but there are meta-packages that can do that. Depending on how the remote system was set up, they may already be there.
 
Marshal
Posts: 5688
337
IntelliJ IDE Python TypeScript Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From your question I'm making the following assumptions
1. The Linux system is a remote system.
2. The Linux system is owned by someone else.

Installing X is a significant change to the system and I'd suggest seeking permission from the owner for that.

Although I'm not entirely sure what you are asking. Are you looking for a full window based experience for the whole operating system because you are not comfortable with the command line? Or are you looking for scroll functionality for a particular use case, such as editing text files?
 
Tim Holloway
Saloon Keeper
Posts: 28327
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You missed the part where OP indicated having sudo/install privileges already.

However, it's true that because of the considerable number of dependencies that an X client requires, it's something that should not be done without consulting with the system owner.

It's also true, though, that these days you have to work extra hard NOT to have X pre-installed even on most server standard configs, so I'd check first.
 
Tim Cooke
Marshal
Posts: 5688
337
IntelliJ IDE Python TypeScript Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I figured that given he said

Any small tool can be allowed to install and not bigger one


which was a bit vague, in my experience you only find out the thing you've installed is too big / unwanted when the owner is calling you up in a rage, or worse his boss is phoning you up in a rage. An unpleasant scenario worth avoiding.
 
Chris Mary
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
# 1 - Remote system is linux
#2 - I am connecting via putty
#3 - Have sudo access
#4 - The Linux system is owned by someone else.
#5 - Not comfortable with command prompt
#6 - looking for scroll functionality for a particular use case, such as editing text files or find or scroll quickly
#7 - Avoid downloading log file for the info
#8 - Looking like notepad or notepad++ or c++ editor olden days where it has scroll
#9 - Any tool of minimal size should be fine less than 5mb

Thanks
 
Marshal
Posts: 8971
646
Mac OS X Spring VI Editor BSD Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Chris Mary wrote:looking for scroll functionality for a particular use case, such as editing text files or find or scroll quickly


For what you need it doesn't sound like you need a full fledged X system. Not comfortable with command prompt isn't a good reason to install X system in my opinion. Basic commands potentially you can figure out.

What's wrong with a text editor like vim? https://www.vim.org/

You can scroll, by default not with mouse, but you can enable mouse pointer as well via .vimrc configuration file. Assuming system supports mouse or it is configured for that.

You could scroll with vim much quicker than you'd do with a mouse, that I can assure you, because you could jump to a particular line with couple of key strokes.
If file(s) you are going to navigate through are big, I'd even recommend to get such text based editor, because it is much lighter on system resources than editor with more sophisticated graphical user interface would be.
 
Sheriff
Posts: 4646
582
VSCode Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would just use less - most Linux distributions include it by default, and it is better than using an actual editor where you may mistakenly delete entries from the log.
 
Tim Holloway
Saloon Keeper
Posts: 28327
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ah, I mis-read "not bigger one".

For log files, it depends. If the files in question are under the journal subsystem, you can scroll using the standard scroll keys. You only need the "journalctl" command itself. Incidentally, the "-xe" option positions to the end of the journal, you can also filter for various subsystems and do text searches in addition. It acts a lot like the "less" command.

If you have a non-journalctl log to look at, one of the easiest editors to use is Emacs, as it honors page operations, and unlike vi/vim, the commands don't look like you sneezed while typing, although it has way too many control keys and customizing it is done in LISP. Some will argue that it exceeds the bounds of "bigger one", as Emacs has often been accused of being an operating system that's only pretending to be a text editor.

A simpler, but still intuitive text editor is nano, which has actually been suggested as a replacement for vim as the standard Linux editor. Unlike Emacs, it really is a simple install. I use it a lot when I don't need heavy-duty edits.

And, as Ron has said, there is also the less command, which is better when you only want to view files and not change them. If your system doesn't have less, it will almost certainly have its older sibling more which operates the same way, but can only scroll down.
 
Rancher
Posts: 326
14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:There is one problem, though. I know of no free or open-source X servers for Microsoft Windows. It's possible that WSL provides an X server and I would actually hope so, but I'm not familiar with the fine points of WSL or for that matter, its licensing.

However, if you can get an X server for your Windows system, it's relatively easy to run remote GUI sessions. There are a few PuTTY command options needed to open the X channel, but it's not that hard. You do have to have X installed on the remote machine also, but there are meta-packages that can do that. Depending on how the remote system was set up, they may already be there.


Here you go:

https://sourceforge.net/projects/vcxsrv/files/vcxsrv/
 
Chris Mary
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Options

1. Vim or less (file name). Shift+g to go to end of the file. Page up or page down to navigate the file
2. Less file name and use page up or page down
3. gvim
4. gedit (GNOME editor)
5. kate (KDE editor)
6. nano
7. emacs (editor macros)
8. mcedit (Midnight Commander editor)
9. 'head' and 'tail' commands
10. 'less' and 'more' commands with pageUp, pageDown

To view a common log file called /var/log/messages use any one of the following command:

less /var/log/messages
more -f /var/log/messages
cat /var/log/messages
tail -f /var/log/messages
grep -i error /var/log/messages
tail command
zcat command
zgrep command
zmore command
dmesg command
journalctl command

Common Linux log files names and usage

/var/log/messages : General message and system related stuff
/var/log/auth.log : Authenication logs
/var/log/kern.log : Kernel logs
/var/log/cron.log : Crond logs (cron job)
/var/log/maillog : Mail server logs
/var/log/qmail/ : Qmail log directory (more files inside this directory)
/var/log/httpd/ : Apache access and error logs directory
/var/log/lighttpd/ : Lighttpd access and error logs directory
/var/log/nginx/ : Nginx access and error logs directory
/var/log/apt/ : Apt/apt-get command history and logs directory
/var/log/boot.log : System boot log
/var/log/mysqld.log : MySQL database server log file
/var/log/secure or /var/log/auth.log : Authentication log
/var/log/utmp or /var/log/wtmp : Login records file
/var/log/yum.log or /var/log/dnf.log: Yum/Dnf command log file.
Linux-File-Management-and-Viewing.jpg
[Thumbnail for Linux-File-Management-and-Viewing.jpg]
linux-commands-for-system-administrators.jpg
[Thumbnail for linux-commands-for-system-administrators.jpg]
File-Search-Commands.jpg
[Thumbnail for File-Search-Commands.jpg]
 
Always! Wait. Never. Shut up. Look at this tiny ad.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic