Command line quick tips: Locate and process files with find and xargs
find is one of the more powerful and flexible command-line programs in the daily toolbox. It does what the name suggests: it finds files and directories that match the conditions you specify. And with arguments like -exec or -delete, you can have find take action on what it… finds.
In this installment of the Command Line Quick Tips series, you’ll get an introduction to the find command and learn how to use it to process files with built-in commands or the xargs command.
Finding files
At a minimum, find takes a path to find things in. For example, this command will find (and print) every file on the system:
find /
And since everything is a file, you will get a lot of output to sort through. This probably doesn’t help you locate what you’re looking for. You can change the path argument to narrow things down a bit, but it’s still not really any more helpful than using the ls command. So you need to think about what you’re trying to locate.
Perhaps you want to find all the JPEG files in your home directory. The -name argument allows you to restrict your results to files that match the given pattern.
find ~ -name '*jpg'
But wait! What if some of them have an uppercase extension? -iname is like -name, but it is case-insensitive:
find ~ -iname '*jpg'
Great! But the 8.3 name scheme is so 1985. Some of the pictures might have a .jpeg extension. Fortunately, we can combine patterns with an “or,” represented by -o. The parentheses are escaped so that the shell doesn’t try to interpret them instead of the find command.
find ~ \( -iname 'jpeg' -o -iname 'jpg' \)
We’re getting closer. But what if you have some directories that end in jpg? (Why you named a directory bucketofjpg instead of pictures is beyond me.) We can modify our command with the -type argument to look only for files:
It turns out you’ve been taking a lot of pictures lately, so narrow this down to files that have changed in the last week with -mtime (modification time). The -7 means all files modified in 7 days or fewer.
The xargs command takes arguments from the standard input stream and executes a command based on them. Sticking with the example in the previous section, let’s say you want to copy all of the JPEG files in your home directory that have been modified in the last week to a thumb drive that you’ll attach to a digital photo display. Assume you already have the thumb drive mounted as /media/photo_display.
The find command is slightly modified from the previous version. The -print0 command makes a subtle change on how the output is written: instead of using a newline, it adds a null character. The -0 (zero) option to xargs adjusts the parsing to expect this. This is important because otherwise actions on file names that contain spaces, quotes, or other special characters may not work as expected. You should use these options whenever you’re taking action on files.
The -t argument to cp is important because cp normally expects the destination to come last. You can do this without xargs using find‘s -exec command, but the xargs method will be faster, especially with a large number of files, because it will run as a single invocation of cp.
Find out more
This post only scratches the surface of what find can do. find supports testing based on permissions, ownership, access time, and much more. It can even compare the files in the search path to other files. Combining tests with Boolean logic can give you incredible flexibility to find exactly the files you’re looking for. With build in commands or piping to xargs, you can quickly process a large set of files.
Random: Japan’s Favourite Nintendo Character Devours The Competition Once More
Nintendo Dream is the name of Japan’s official Nintendo publication, a magazine that began in 1996 and last year overtook the mighty Nintendo Power in terms of issues published. It’s still going strong, too, with the latest issue being December 2019. Yes, we know it’s still October. Ah, how we miss the steady acceleration of print magazines throughout the year – gotta squeeze in that 13th issue!
The mag regularly features a poll of the most popular Nintendo characters according to readers, and every time it’s dominated by just one character. And no, if that big moustachioed sad face above didn’t clue you in, it’s not the company’s mascot plumber. This month it’s once again pink puffball Kirby who takes the top spot. In fact, he took the last one, too. And the one before that. And the one before that. Here’s this month’s ranking courtesy of Japanese Nintendo:
1. Kirby – 189pt 2. Mario – 111pt 3. Link – 96pt 4. Pikachu 5. Luigi 6 Isabelle 7. Zelda 8. Dimitri 9. Yoshi 10. Peach
The toppermost of the poppermost. Again.
The rest of the list shuffles around every month, but Kirby is a regular fixture at the very top. Good for him! We’ve got nothing against the little guy – after all, he is the saviour of the entire world according to Super Smash Bros. Ultimate – but it’s tough to imagine him getting that sort of love in the west.
Then again, we don’t get those incredible pop-up cafes over here. Just thinking about them gives us a face like the plumber up top. Perhaps if Nintendo gave us a taste of that delicious merch then Kirby would enjoy this sort of popularity outside his homeland. Chance’d be a fine thing.
Reckon we’ve got it wrong and we’re underestimating the Kirbmeister’s popularity in the west? Who do you think would top the same poll in the west? Let us know your candidates below – we wouldn’t be surprised to see Waluigi break the top 5.
Reggie Calls Wii U A “Failure Forward” Because It Led To Switch
Reggie Fils-Aimé may no longer be the president of Nintendo, but he’s forever in our hearts – and, if he keeps giving lectures on his time with the Japanese company like the one he did yesterday at Cornell University, that’s going to be the case for a long time.
During the lecture, Reggie – who is now the university’s inaugural Leader in Residence – spoke about a wide range of topics, including the ill-fated Wii U. The successor to the insanely popular Wii, this system aimed to introduce the concept of asymmetrical gameplay to a whole new generation of players, but consumers didn’t respond and it has gone down as one of Nintendo’s most costly hardware flops – despite playing host to some stunning games.
The lecture isn’t available online at the moment (it’s coming, though), but ResetEra user Theorymon has posted up some brief impressions and notes. During one section, Reggie admitted that the Wii U was a bust, but called it a “failure forward”, since it led directly to the creation of the Switch. As we all know, Switch is anything but a failure, and has put Nintendo back at the forefront of the games industry.
Do you think the Wii U was a mistake worth enduring in the light of it leading to the Switch, or are you of the opinion that Reggie’s outlook is a little too positive? Let us know with a comment.
Verizon Is Giving Customers Free Disney+ Subscriptions
With Disney Plus only a few weeks away, millions of folks are undoubtedly gearing up to add another streaming service to their carousel of subscriptions. If you're a Verizon customer, you may be eligible for a free 12-month subscription of Disney Plus. All Verizon customers with unlimited plans will get a year of the highly anticipated service on the house come launch day.
The promotion is for both new and existing customers, so if you currently have a Verizon family plan, you're going to get all the Disney, Marvel, Star Wars, and Pixar content free of charge for your first year.
New 5G home internet and Verizon Fios home internet customers are also eligible for the Disney Plus promotion. The difference here is that existing home internet customers will not get Disney Plus, unless of course you have an unlimited family plan, too.
The Mandalorian, the first live-action Star Wars show, leads the charge for new content on Disney Plus, but there's a ton of existing content to look forward to, including nine Star Wars movies, some of the best Pixar animated films, and a close-to-comprehensive back catalogue of Disney movies.
Google added virtual machine (VM) types on Google Compute Engine including second-generation Intel Xeon scalable processor machines and new VMs for compute- and memory-heavy applications. The former, available in beta, are general-purpose VMs. They provide greater than 20% price-performance improvement for many workloads and support up to 25% more memory per virtual CPU compared with first-generation machines, according to Google. These N2 VMs offer a balance of compute, memory, storage, and network resources for general-purpose workloads such as web and application servers, enterprise applications, gaming servers, content and collaboration systems, and most databases. They are available in Google’s U.S.-Central, Europe-West, and Asia-Southeast region now and will be available in most Google Cloud Platform (GCP) regions in the next few months. (Source: SDX Central)
Humble are running another Bundle of interest to game developers, this one is the Developing Your Own Games by Springer bundle. A massive collection of e-books by APress covering a huge number of game engines and technologies. As always it is broken into tiers, if you buy a higher value tier you get all of the lower value tiers below it as well.
The tiers of this bundle consist of:
1$
Java Game Development with LibGDX
Beginning Swift Games Development for iOS
Learn Unity for Android Game Development
Practical Video Game Bots
Developing Games on The Raspberry Pi
Developing Turn-Based Multiplayer Games
Python, PyGame and Raspberry Pi Game Development
8$
Mostly Codeless Game Development
Learn Unity for Windows 10 Game Development
The Advanced Game Developer’s Toolkit
Pro Java 9 Games Development
Building Games with Ethereum Smart Contracts
Essential TypeScript
Practical GameMaker Studio
Physically Based Shader Development for Unity 2017
15$
Developing 2D Games with Unity
Program Arcade Games
Beginning Android Games
Let’s Build a Multiplayer Phaser Game
Beginning iOS AR Game Development
Game Development with Construct 2
Understanding Game Application Development
Pro HTML5 Games
Introducing JavaScript Game Development
GameMaker Studio 100 Programming Challenges
As always with Humble you can decide how your money is allocated, between the publisher, Humble, charity or if you so choose (and thanks if you do!) to support GameFromScratch by using this link. Learn more about the bundle in the video below.
Another day, another deck-builder, but does Aeon’s End have a sufficient number of tricks up its wizard-y sleeves to stand out in a crowded market? The first attention-grabbing feature is that Aeon’s End is a cooperative game that can be played in pass and play mode with up to three other players, but also works equally well with a solo player controlling a maximum of four mages. These mages have learned mastery over energy breaches, allowing them to cast powerful spells. One small problem; the breaches have also permitted the Nemesis to come a-calling. This guy wants nothing more than to destroy your home of Gravehold, and to slaughter a few mages along the way.
There are three types of cards in Aeon’s End; gems are the game’s currency, spells are used to inflict damage and relics have a range of special powers. At the start of each game, a supply of nine available cards is determined. You are free to either choose at will, select from a particular theme, or even go for a completely random set-up. This supply is selected from a range of 27 different options and, much like Dominion, this market will contain the same set of cards for the entire game.
Whilst in many similar games, currency is only used for buying cards, in Aeon’s End it has other uses too. The currency, a resource known as aether, can be used to open additional breaches, thus allowing the mage to prepare more spells. Or, it can be used to charge a mage’s unique power. These extra choices really add to the decision-making process, making players think carefully about the best way to distribute their limited resources.
Deck-builders are usually characterised by more shuffling than a Post Office queue on pension day. The physical chore of shuffling doesn’t affect us lazy digital gamers, but the resultant randomness certainly does. In Aeon’s End, when your deck is exhausted, you simply flip your discard deck and continue playing. It doesn’t sound like a big change, but it does provide the opportunity to plan future turns and prepare some killer combos. It also means that extra thought is needed when deciding on the order to discard your spent cards. If this isn’t enough to think about, there is also the option to keep unused cards in your hand for use in future turns.
Another area in which Aeon’s End excels is in the wide variety of set up options. Each game will pit the mages against one of four different nemeses. My personal favourite is the Prince of Gluttons who gobbles up the supply of cards faster than Pacman can munch dots. Or, maybe, Crooked Mask, who has a nasty habit of shuffling your deck whilst adding a few nasty corruption cards for you to deal with. All four fiends are not averse to playing a barrage of nasty cards, whilst also throwing a few henchmen into the fray. To up the tension even further, the power of each nemesis increases as the game progresses. Much thought has been spent on the design of all four nemeses, they are distinctly different and offer their own challenges. At times, their powers can feel a little harsh, but never unfair.
Another twist that adds to player anxiety is the way that turn order is decided. Aeon’s End does away with predictability by randomising the order at the end of each round. The turn order deck is always composed of four player cards and two nemesis cards. So, if you only play with one mage you will be getting four turns each round. This can impact on how you coordinate the actions of your mages. Especially since mages first have to prepare spells by allocating them to an open energy breach. Only on the following turn is the spell energised and ready.
There is a roster of eight mages, each with their own set of ten starting cards. These will be a mix of aether crystal cards, weedy spark spells and, more interestingly, one unique card.
Jian’s moonstone provides her with an extra aether which can only be used for purchasing gems. A specified set of five of these cards will make up the mage’s first hand. Xaos, for instance, begins with four crystals allowing him to buy a decent card from the supply on the very first turn. Mages also have a special ability that needs to be fully charged before use. Returning to our friend, Jian, she can use her black mirror ability to enable any mage to cast a prepared spell twice.
Aeon’s End has a lot of on screen information to keep track of which means that the game is a tablet exclusive. Even on larger tablets, the artwork is often sacrificed to squeeze everything onto the screen. There are also a large range of tiny icons to decipher which is a barrier to learning. Thankfully, a tap and hold will bring up a card in full detail, also giving you a chance to admire the illustrations. There is certainly more going on here than in many other card games, but it doesn’t reach Twilight Struggle realms of complexity. Developers Handelabra are a safe pair of hands, as their work on Sentinels of the Multiverse and One Deck Dungeon testifies. The lack of online options is a tad disappointing, but this is still a top-notch conversion.
Aeons End is a wonderful game, the control that it offers over deck management is especially worthy of merit. The cards seem to be very well balanced with no absolute stinkers or overpowered abilities. Variety is also a big plus, each mage feels distinct and each nemesis requires a different approach. There is a generous amount of content, with challenging difficulty levels, a choice of 27 different types of market cards, four nemeses and eight mages.
Today we are thrilled to announce the release of .NET Core 3.0! .NET Core 3.0 is ready for production use, and is loaded with lots of great new features for building amazing web apps with ASP.NET Core and Blazor.
Some of the big new features in this release of ASP.NET Core include:
Build rich interactive client-side web apps using C# instead of JavaScript using Blazor).
Create high-performance backend services with gRPC.
SignalR now has support for automatic reconnection and client-to-server streaming.
Generate strongly typed client code for Web APIs with OpenAPI documents.
Endpoint routing integrated through the framework.
HTTP/2 now enabled by default in Kestrel.
Authentication support for Web APIs and single-page apps integrated with IdentityServer
Support for certificate and Kerberos authentication.
Integrates with the new System.Text.Json serializer.
New generic host sets up common hosting services like dependency injection (DI), configuration, and logging.
New Worker Service template for building long-running services.
New EventCounters created for requests per second, total requests, current requests, and failed requests.
Startup errors now reported to the Windows Event Log when hosted in IIS.
Request pipeline integrated with with System.IO.Pipelines.
Performance improvements across the entire stack.
You can find all the details about what’s new in ASP.NET Core in .NET Core 3.0 in the What’s new in ASP.NET Core 3.0 topic.
Note: .NET Core 3.0 requires Visual Studio 2019 16.3 or later.
There is also a Blazor WebAssembly preview update available with this release. This update to Blazor WebAssembly still has a Preview 9 version, but carries an updated build number. Blazor WebAssembly is still in preview and is not part of the .NET Core 3.0 release.
To install the latest Blazor WebAssembly template run the following command:
dotnet new -i Microsoft.AspNetCore.Blazor.Templates::3.0.0-preview9.19465.2
To upgrade an existing ASP.NET Core 3.0 RC1 project to 3.0:
Update all Microsoft.AspNetCore.* and Microsoft.Extensions.* package references to 3.0.0
Update all Microsoft.AspNetCore.Blazor.* package references to 3.0.0-preview9.19465.2
That’s it! You should now be all set to use .NET Core 3.0!
Join us at .NET Conf!
Please join us at .NET Conf to learn all about the new features in .NET Core 3.0 and to celebrate the release with us! .NET Conf is a live streaming event open to everyone, and features talks from many talented speakers from the .NET team and the .NET community. Check out the schedule and attend a local event near you. Or join the Virtual Attendee Party for the chance to win prizes!
Give feedback
We hope you enjoy the new features in this release of ASP.NET Core and Blazor in .NET Core 3.0! We are eager to hear about your experiences with this latest .NET Core release. Let us know what you think by filing issues on GitHub.
Apple website, Apple Music, developer services suffering from outage
By Malcolm Owen Wednesday, October 16, 2019, 10:35 am PT (01:35 pm ET)
A number of Apple’s online services have suddenly gone offline, with websites and online tools no longer accessible and services like Apple Music encountering errors when trying to stream songs.
At around 1:24pm eastern, AppleInsider noticed the official Apple newsroom was inaccessible, displaying a message advising the page “cannot be found.” Shortly after, other areas of Apple’s online existence stopped working or were unavailable.
In further checks by AppleInsider staff, Apple’s developer site also became unavailable, and the official System Status page that usually displays issues with servers is also offline. Other services are also undergoing issues, including some outages of iCloud itself.
Apple Music was also affected by the outage, with attempts to play music not downloaded to a device displaying errors. One error advised that “A server with the specified hostname could not be found.”
In the time since the discovery of issues, some services are slowly being restored, with the newsroom and iCloud back up and running, followed by the System Status page and Apple Music.
AppleInsider has contacted Apple to query about the server issues.
This story is breaking, refresh for the latest updates
IceWM is a very lightweight desktop. It’s been around for over 20 years, and its goals today are still the same as back then: speed, simplicity, and getting out of the users way.
I used to add IceWM to Scientific Linux, for a lightweight desktop. At the time, it was only a .5 Meg rpm. When running, it used only 5 Meg of memory. Over the years, IceWM has grown a little bit. The rpm package is now 1 Meg. When running, IceWM now uses 10 Meg of memory. Even though it literally doubled in size in the past 10 years, it is still extremely small.
What do you get in such a small package? Exactly what it says, a Window Manager. Not much else. You have a toolbar with a menu or icons to launch programs. You have speed. And finally you have themes and options. Besides the few goodies in the toolbar, that’s about it.
Installation
Because IceWM is so small, you just install the main package.
$ sudo dnf install icewm
If you want to save disk space, many of the dependencies are soft options. IceWM works just fine without them.
The defaults for IceWM are set so that your average windows user feels comfortable. This is a good thing, because options are done manually, through configuration files.
I hope I didn’t loose you there, because it’s not as bad as it sounds. There are only 8 configuration files, and most people only use a couple. The main three config files are keys (keybinding), preferences (overall preferences), and toolbar (what is shown on the toolbar). The default config files are found in /usr/share/icewm/
To make a change, you copy the default config to you home icewm directory (~/.icewm), edit the file, and then restart IceWM. The first time you do this might be a little scary because “Restart Icewm” is found under the “Logout” menu entry. But when you restart IceWM, you just see a single flicker, and your changes are there. Any open programs are unaffected and stay as they were.
Themes
IceWM in the NanoBlue theme
If you install the icewm-themes package, you get quite a few themes. Unlike regular options, you do not need to restart IceWM to change into a new theme. Usually I wouldn’t talk much about themes, but since there are so few other features, I figured I’m mention them.
Toolbar
The toolbar is the one place where a few extra features have been added to IceWM. You will see that you can switch between workplaces. Workspaces are sometimes called Virtual Desktops. Click on the workspace to move to it. Right clicking on a windows taskbar entry allows you to move it between workspaces. If you like workspaces, this has all the functionality you will like. If you don’t like workspaces, it’s an option and can be turned off.
The toolbar also has Network/Memory/CPU monitoring graphs. Hover your mouse over the graph to get details. Click on the graph to get a window with full monitoring. These little graphs used to be on every window manager. But as those desktops matured, they have all taken the graphs out. I’m very glad that IceWM has left this nice feature alone.
Summary
If you want something lightweight, but functional, IceWM is the desktop for you. It is setup so that new linux users can use it out of the box. It is flexible so that unix users can tweak it to their liking. Most importantly, IceWM lets your programs run without getting in the way.