Jump to content

Today I Learned...


Fuddster

Recommended Posts

I used the backup software Back In Time to back up my /home folder during my recent openSUSE reinstall. Somehow I missed a setting, I still don't know which one, that allowed BIT to copy/restore more copies of my files with ".backup.fulldate" appended to each file.

 

OVER 250,000 OF THEM!

 

I use the find command often, so I opened a terminal and fired it up. To make sure my search pattern worked, I sent the results to a text file and gave it a quick look.

 

And Today I Learned that the find command has a -delete switch that made getting rid of those files a snap!

 

The full command went something like

find /home/fuddster/ -name "*.backup.20180721" -delete

 

Even with commands you use all the time, there's always something else you can learn about them.

 

What's your favorite AHA! moment like that?

  • Like 3
Link to comment
Share on other sites

Well yesterday I learned the hard way never to assume. I was going to allow openSUSE to recreate my /home, so I copied files to a flash drive before my Leap 15 install. When I went to get my Thunderbird files, I found that .thunderbird and .mozilla had NOT been copied to the flash drive. First I thought I had stupidly not asked to copy hidden files, but I must have because I got .config, .cache, etc., just not what I really needed. Absolutely my own fault for not checking before starting the install, but still really aggravating. I dug around and found a .thunderbird backup that was about a year old, so at least got back most of my address book, but what a pain.

  • Like 1
Link to comment
Share on other sites

One of my favorite AHA! moments was when I learnt that you could open a new tab in FF by middle clicking on an open space in the top bar, no more fiddling to hit the little cross. :Laie_95:

 

An a similar AHA! moment was when I learnt to copy by holding down the left mouse button and to paste in linux with a middle click. This trick has its down side as when I am in Windows it does not work and confuses the heck out of me poor old grey cell. :228823:

  • Like 4
Link to comment
Share on other sites

Some good tips. I usually use exec with find eg.:

find . -name "*.wmv" -type f -exec rm {} \;

 

And yes I hate it when middle button paste doesn't work in Windows.

Link to comment
Share on other sites

One of my favorite AHA! moments was when I learnt that you could open a new tab in FF by middle clicking on an open space in the top bar, no more fiddling to hit the little cross. :Laie_95:

 

 

AHA! I use Pale Moon, and this trick works with that browser as well! Thanks, abarbarian!

  • Like 1
Link to comment
Share on other sites

Hedon James

TIL that educating prisoners may not be a good thing,

 

364 Idaho Inmates Hacked Their Prison Tablets for Free Credits

 

 

:Muahaha: :Laughing:

 

Haha! I saw that too! Goes to show that they CAN be "rehabilitated" through teaching of productive and useful skills, but we still can't rehabilitate their brain in order to use those skills for good.

 

Reminds me of that Stallone/Snipes movie "Demolition Man" where the convicted are frozen in pods, while their brains are re-programmed for societal integration. Stallone's overzealous cop character is taught knitting (presumably to help with relaxation?) while Snipes' psychopath character learns extensive electronics and computer programming. What could possibly go wrong with that?

  • Like 1
Link to comment
Share on other sites

TIL.

 

Create an alias for sudo with a space at the end:

 

alias sudo='sudo '

 

Then all other aliases will work with sudo.

 

As in

 

alias   w7=" sudo mount /dev/nvme0n1p3 /mnt"
alias   w7u=" sudo umount /dev/nvme0n1p3"

 

This allows me to mount and unmount my Windows 7 partition on the rare occasion I need to transfer some files.

 

:breakfast:

Link to comment
Share on other sites

  • 3 weeks later...

If you are editing /etc/fstab, say to configure an SSD you can make a typo or add a space and then completely bork your system boot. To check you have done this edit right issue the following terminal command BEFORE reboot.

 

$ sudo mount -a

 

If this works without error you are good to go. If not, fix /etc/fstab and try again until error-free.

  • Like 1
Link to comment
Share on other sites

Today I learned (the hard way) ..... synchronizing works both ways.

 

Just stuck my toe in the "Linux pool" by using "LICK" to do an easy dual boot with Puppy.

Rather than do all the work of setting up the included browser (Palemoon), I installed Firefox, and "synchronized".

 

Now, back on Windows, all the NoScript "trusted" sites are back in "default" mode, and stuff doesn't work until I put it back. :(

 

If the only things you want to synchronize are bookmarks and log-ins ...... UNCHECK EVERYTHING ELSE !

  • Like 1
Link to comment
Share on other sites

If you mess up /etc/fstab and are unable to boot to a GUI and fstab is now read-only, you can remount the fs as follows if you can get to a root shell in recovery mode:

 

mount -n -o remount -t ext4 /dev/sda1 /

 

You should then be able to use nano (or VIM) to edit your fstab file and get back to where you were before. Note depending on your setup the partition info and file system parameters may differ.

Edited by raymac46
Link to comment
Share on other sites

  • 1 year later...
abarbarian
1 hour ago, securitybreach said:

 

Yeah, I would probably be using it if Wayland supported Nvidia.

 

Right your using nvidia drivers not the nouveau drivers. Posted in case anyone missed the news. 😎

Link to comment
Share on other sites

securitybreach
7 hours ago, abarbarian said:

 

Right your using nvidia drivers not the nouveau drivers. Posted in case anyone missed the news. 😎

 

Well Noveau is ok if you just have one monitor and do not need graphic performance but other than that, it is not very good. Now its not noveau's fault as they are having to reverse engineer the nvidia driver as Nvidia doesn't share any of their code, hence the Linus gesture to them years back  https://www.wired.com/2012/06/torvalds-nvidia-linux/

 

4fdf5ea4eab8eadd1d000006?width=1190

 

On the other hand, AMD has a team dedicated to developing their open source driver along with the community.

 

  • +1 1
Link to comment
Share on other sites

  • 11 months later...
abarbarian

😎TIL a neat little cli program,

 

The CLI To-Do List / Task Manager for Geeks

 

There is a neat .gif showing it running,

 

geek-life_v1.gif

 

Highlights

  • For ninjas - do things faster with keyboard shortcuts
  • Markdown lovers, feel at :house:! You'll see markdown everywhere.
  • Full featured (almost) - Projects, Tasks, due-dates, task notes...
  • A <4MB app that takes <1% CPU and ~7MB memory 1 - how much lighter you can think?
  • Task note editor with markdown syntax highlighting2
  • Full mouse support

😎

Link to comment
Share on other sites

securitybreach

Neat but missing the most important part of a Todo list, Benning able to sync between devices.

Link to comment
Share on other sites

abarbarian
59 minutes ago, securitybreach said:

Neat but missing the most important part of a Todo list, Benning able to sync between devices.

 

 

Quote

 

❓ Where is the data stored? Can I change the location?

By default, it will try to create a db file in you home directory.

But as a geek, you may try to put it different location (e,g, in your dropbox for syncing). In that case, just mention DB_FILE as an environment variable.


DB_FILE=~/dropbox/geek-life/default.db geek-life

 

 

He does give some help with setting up a sync feature. Admittedly not everyone uses DropBox but then again not everyone needs a sync feature as there are many single pc users out there.

 

😎

Link to comment
Share on other sites

  • 2 weeks later...
abarbarian
On 5/15/2021 at 3:31 PM, securitybreach said:

Gotcha. I wonder if it would work with pcloud

 

Don't see why not.😎

  • Agree 1
Link to comment
Share on other sites

abarbarian

TIL

 

HOW TO: Get a General Purpose Mouse Cursor for Your Linux TTY Virtual Console

Quote

If you work with the TTY virtual console on your Linux box, you might want a general purpose mouse functionality. Why? I don’t know why YOU might need it but, so far, I’ve use it for copy-pasting.

 

For Arch users,

 

https://archlinux.org/packages/core/x86_64/gpm/

 

https://archlinux.org/packages/core/x86_64/gpm/

 

This would have saved me quite a lot of time and effort in my early days learning about linux os's. I doubt I will use it much in the future but it could come in handy.

 

😎

 

 

  • Like 1
Link to comment
Share on other sites

abarbarian
On 5/27/2021 at 11:56 AM, securitybreach said:

Wait? You didn't know about GPM?? It's been around since 2009.

 

Takes me a while to catch up with things.

 

Just love the developers page at GitHub,

 

 
 
Quote
 
Who needs constant updates if your base is sound.


🤣

 

 

 

Edited by abarbarian
  • Haha 1
Link to comment
Share on other sites

  • 3 months later...

TDI

 

Came across some MPV extras that I did not know about, they are MPV User-Scripts.

 

User Scripts 

Quote

Here is a list of scripts that users of mpv have published, adding functionality that is not part of the core mpv player. Most of these scripts are unofficial 3rd party scripts. Anyone can add their own script by editing this wiki.

 

I have used three of the scripts and find them very useful.

 

history-bookmark.lua

I watch Anime and TV series but like to download the entire series before I watch. Also I may just watch a couple of episodes and then not return to watching for a few days or even weeks. Sometimes I have several series on the go as I like to watch stuff to suit my mood. As you can imagine this makes tracking which episode I need to watch next a tad tricky.

The above script helps find the correct episode to watch easily.

 

autoload.lua

A neat script. Down at the bottom ;left in mpv you have a two little arrows for last/next item. On my mpv they have always been greyed out and done nothing. With this script they are showing active and the call up last/next item. I addition they show a playlist on screen for a very short time of the items in the folder you are playing items from. This works with series which are named the same with episode numbering and also with a folder containing random named files. I have some folders with movies and odd shorts so it is handy to see what I have directly in mpv rather than going to the folder itself all the time.

 

autocrop.lua

I watch a lot of older stuff and it is mainly in 4:3 aspect which is ok for nostalgia but the black lines at the side of the screen bug me as I have a widescreen monitor. Now not all 4:3 stuff looks good if filling the screen but quite a lot of the anime I watch looks just fine to me when it is changed from 4:3 to filling the screen which is what this script does.

I have not tried it out with those stupid cinema screen films that have empty black spaces at the top and bottom of the screen. I hope it works with them as they really do make me see red.

 

There is another script that is dedicated to changing 4:3 to fill your screen but I have not tried it out yet. As you can see there are many scripts for all sorts of things in the User-Script library and if you are able it seems pretty easy to add your own scripts too.

Don't you just love the versatility of penguins.

Enjoy.

😎

 

 

 

  • +1 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...