Open-source News

Genode OS Framework In 2023 Aims For Rust Apps, Intel P / E Core Handling, Mobile OS

Phoronix - Wed, 01/18/2023 - 18:27
The Genode open-source operating system framework that pursues a micro-kernel design has published their technical roadmap for the 2023 calendar year...

5 ways to use the Linux terminal to manage your files

opensource.com - Wed, 01/18/2023 - 16:00
5 ways to use the Linux terminal to manage your files sethkenlon Wed, 01/18/2023 - 03:00

A terminal is an application that provides access to the user shell of an operating system. Traditionally, the shell is the place where the user and the OS could interface directly with one another. And historically, a terminal was a physical access point, consisting of a keyboard and a readout (a printer, long ago, and later a cathode ray tube), that provided convenient access to a mainframe. Don't be fooled by this "ancient" history. The terminal is as relevant today as it was half a century ago, and in this article, I provide five common file management tasks you can do with nothing but shell.

1. Open a terminal and look around

Today, everyone's got a computer on their desk or in their bag. The mainframe-and-terminal model is now essentially emulated through an application. Your operating system might have a unique name for it, but generically it's usually known as a "terminal" or "console".

  • Linux: Look for Console, Konsole, or Terminal. Regardless of the name, you can usually launch it from your application menu using the key word "terminal."

  • macOS: The default terminal application isn't open source and is widely considered lacking in features. Download iTerm2 to get a feature-rich, GPLv2 replacement.

  • Windows: PowerShell is the open source terminal application, but it uses a language and syntax all its own. For this article to be useful on Windows, you can install Cygwin which provides a POSIX environment.

Once you have your terminal application open, you can get a view of your file system using the command ls.

ls2. Open a folder

In a graphical file manager, you open a folder by double-clicking on it. Once it's open, that folder usually dominates the window. It becomes your current location.

In a terminal, the thought process is slightly different. Instead of opening a folder, you change to a location. The end result is the same: once you change to a folder, you are "in" that folder. It becomes your current location.

For example, say you want open your Downloads folder. The command to use is cd plus the location you want to change to:

cd Downloads

To "close" a folder, you change out of that location. Taking a step out of a folder you've entered is represented by the cd command and two dots (..):

cd ..

You can practice entering a folder and then leaving again with the frequent use of ls to look around and confirm that you've changed locations:

$ cd Downloads $ ls cat-photo.jpg $ cd .. $ ls Documents Downloads Music Pictures Videos $ cd Documents $ ls zombie-apocalypse-plan-C.txt zombie-apocalypse-plan-D.txt $ cd .. $ ls Desktop Documents Downloads Music Pictures Videos

Repeat it often until you get used to it!

The advanced level of this exercise is to navigate around your files using a mixture of dots and folder names.

Suppose you want to look in your Documents folder, and then at your Desktop. Here's the beginner-level method:

$ cd Documents $ ls zombie-apocalypse-plan-C.txt zombie-apocalypse-plan-D.txt $ cd .. $ ls Desktop Documents Downloads Music Pictures Videos $ cd Desktop $ ls zombie-apocalypse-plan-A.txt

There's nothing wrong with that method. It works, and if it's clear to you then use it! However, here's the intermediate method:

$ cd Documents $ ls zombie-apocalypse-plan-C.txt zombie-apocalypse-plan-D.txt $ cd ../Desktop $ ls zombie-apocalypse-plan-A.txt

You effectively teleported straight from your Documents folder to your Desktop folder.

There's an advanced method, of this, too, but because you know everything you need to know to deduce it, I leave it as an exercise for you. (Hint: It doesn't use cd at all.)

3. Find a file

Admit it, you sometimes misplace a file. There's a great Linux command to help you find it again, and that command is appropriately named find:

$ find $HOME -iname "*holiday*" /home/tux/Pictures/holiday-photos /home/tux/Pictures/holiday-photos/winter-holiday.jpeg

A few points:

  • The find command requires you to tell it where to look.

  • Casting a wide net is usually best (if you knew where to look, you probably wouldn't have to use find), so I use $HOME to tell find to look through my personal data as opposed to system files.

  • The -iname option tells find to search for a file by name, ignoring capitalization.

  • Finally, the "holiday" argument tells find that the word "holiday" appears somewhere in the filename. The * characters are wildcards, so find locates any filename containing "holiday", whether "holiday" appears at the beginning, middle, or end of the filename.

The output of the find command is the location of the file or folder you're looking for. You can change to a folder using the cd command:

$ cd /home/tux/Pictures/holiday-photos $ ls winter-holiday.jpeg

You can't cd to a file, though:

$ cd /home/tux/Pictures/holiday-photos/winter-holiday.jpeg cd: Not a directory4. Open a file

If you've got a file you want to open from a terminal, use the xdg-open command:

$ xdg-open /home/tux/Pictures/holiday-photos/winter-holiday.jpeg

Alternately, you can open a file in a specific application:

$ kate /home/tux/Desktop/zombie-apocalypse-plan-A.txt5. Copy or move a file or folder

The cp command copies and the mv file moves. You can copy or move a file by providing the current location of the file, followed by its intended destination.

For instance, here's how to move a file from your Documents folder to its parent directory:

$ cd Documents $ ls zombie-apocalypse-plan-C.txt zombie-apocalypse-plan-D.txt $ mv zombie-apocalypse-plan-C.txt .. $ cd .. $ ls Documents Downloads Music Pictures Videos zombie-apocalypse-plan-C.txt

More Linux resources Linux commands cheat sheet Advanced Linux commands cheat sheet Free online course: RHEL technical overview Linux networking cheat sheet SELinux cheat sheet Linux common commands cheat sheet What are Linux containers? Our latest Linux articles

While moving or copying, you can also rename it. Here's how to move a file called example.txt out of the directory with the new name old-example.txt:

$ mv example.txt ../old-example.txt

You don't actually have to move a file from one directory to another just to rename it:

$ mv example.txt old-example.txtTerminal for files

The Linux desktop has a lot of file managers available to it. There are simple ones, network-transparent ones, and dual-panel ones. There are ones written for GTK, Qt, ncurses, and Swing. Big ones, small ones, and so on. But you can't talk about Linux file managers without talking about the one that's been there from the beginning: the terminal.

The terminal is a powerful tool, and it takes practice to get good at it. When I was learning the terminal, I used it for what I could, and then I opened a graphical file manager for advanced operations that I hadn't learned for the terminal yet. If you're interested in learning the how to use a terminal, there's no time like the present, so get started today!

Try one of these common file management tasks on Linux using just the shell.

Image by:

iradaturrahmat via Pixabay, CC0

Linux 24 Linux file managers 5 reasons I use the Dolphin file manager on Linux Try this Java file manager on Linux Feel like a Linux wizard with the Thunar file manager Make your Linux computer feel faster with the Xfe file manager Why you should try the Nemo file manager on Linux How the Linux Worker file manager can work for you Why I use the Enlightenment file manager on Linux Manage your file system from the Linux terminal A Linux file manager for Emacs fans How to use the Linux file manager for GNOME 2 Simplify your Linux PC with the PCManFM file manager A Linux file manager for Vim fans Try this Linux web browser as your file manager Experience Linux desktop nostalgia with Rox Enjoy two-panel file management on Linux with far2l 5 reasons to love Linux GNOME Files Travel back in time with the mc file manager on Linux Try this Python-based file manager on Linux Discover the power of the Linux SpaceFM file manager Explore the features of the Linux Double Commander file manager My 4 favorite features of the 4pane file manager on Linux 3 delightful features of the Linux QtFM file manager Experience the power of the Linux Krusader file manager How to use your Linux terminal as a file manager This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

How to Install LibreOffice in Ubuntu

Tecmint - Wed, 01/18/2023 - 15:13
The post How to Install LibreOffice in Ubuntu first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Are you an open-source enthusiast? If yes, then you must already be aware of LibreOffice, which is a widely used free office suite application in Linux and is also considered a good alternative to

The post How to Install LibreOffice in Ubuntu first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

GNOME's Mutter Adds Support For Toggling Byte-Swapped XWayland Clients

Phoronix - Wed, 01/18/2023 - 07:23
Stemming from the X.Org Server change to no longer allow byte-swapped clients by default due to the feature being rarely used but of significant security concerns with being a large attack surface, GNOME's Mutter compositor has added optional support for being able to enable byte-swapped XWayland clients...

Intel Core i5 13400 Linux Performance - Raptor Lake 10 Cores / 16 Threads For $239

Phoronix - Wed, 01/18/2023 - 04:00
Earlier this month at CES, Intel announced the 35 and 65 Watt Raptor Lake processors alongside the 13th Gen Core Mobile CPUs. Those new Raptor Lake desktop CPUs are now available from multiple Internet retailers and the mid-range Core i5 13400 recently arrived at Phoronix to put it through its paces under Linux.

Pages