Skip to main content

Posts

Showing posts with the label Nano

Nano editor shortcut keys

Nano editor in Linux is quite handy when working with text files in terminal window. Here's some keystroke that is quite useful when using Nano or editing text file with Nano. Ctrl + i  is like pressing the "Tab" key Ctrl + y will   go to top of the current displayed window or the top of the current nano screen Ctrl + v will go to the end of the current displayed window or the end of the current nano screen Ctrl + m  will move current line below the current cursor position Ctrl  + d will delete empty line                or will delete tab spaces                or will delete a single character if the line has text on it Ctrl + k   will cut the current line or current line will be cut and copied to clipboard (like Ctrl + x in word document if the text is highlighted) Ctrl + u   will paste the line that was cut or whatever is on the clipboard (like Ctrl /+ v in word doc...

Linux find accessed and modified files

Finding accessed and modified files might be necessary at times to check or for audit purposes. If files kept in a folder or directory has been accessed or modified but should not be the case then something dubious is going on.  In Linux finding accessed and modified files can be done in a one liner command. find /home -type f -amin -60 || -mmin -60 -print Above command will find or show any files accessed within the last 60 minutes with the option "-amin" and it will show also the files modified within the last 60 minutes with the option "-mmin". A shell script can be created and further processing can be done when files are detected. The time can be adjusted if there's a need, but a more robust solution to check any accessed or modified files should be a file system watcher, but above command is quite helpful to check any activity that should not be occurring. Cheers..till next time!   ================================ Free Android Apps: Click  links below to f...

How to copy a line using Nano editor?

Copying in Nano needs a few keys to copy and paste.  Copy and paste goes hand in hand, there’s no point to copy if you cannot paste. So, how to copy using Nano editor in Linux? To copy in Nano editor , a few key strokes are needed. On the beginning of the line that will be copied press: ctrl + 6 (to set a mark) Press “end” key or use right arrow to go to the end of the line. If multiple lines are to be copied used down arrow to select the lines. After selecting the line or lines to be copied, press: alt + 6 (to set unmark and all line/s selected is copied to the clipboard already. To copy the line or lines, position the cursor where the line/s will be copied and press: ctrl + u (this will paste the line/s or whatever is on the clipboard) That’s it, quite a few key strokes to remember but if you’re in a command line or in Putty; then these key combination to copy and paste in Nano is really a life saver. Cheers..till next ...