Skip to main content

Posts

Showing posts with the label Nano

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 find out mor…

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 time. :)


================================ Free Android Apps:
Click  link…