Open-source News

PHP 8.2 Released With Readonly Classes, Random Extension

Phoronix - Thu, 12/08/2022 - 20:09
PHP 8.2 is out today as the annual major feature release to this widely-used scripting language primarily for web purposes...

The Most Interesting New Features For Linux 6.1

Phoronix - Thu, 12/08/2022 - 19:43
With the Linux 6.1 kernel set to be released this weekend, here is a look back at the prominent changes to find with this kernel. Linux 6.1 besides being the last kernel version of the year is all the more important in that it's expected to be the new Long Term Support (LTS) kernel...

RADV Lands Dynamic Rasterization Samples & Line Rasterization Mode

Phoronix - Thu, 12/08/2022 - 18:40
Thanks to the work led by Valve engineers on the open-source Linux graphics stack, Mesa 23.0 continues picking up new features for the Radeon Vulkan "RADV" driver...

Intel oneAPI Level Zero Being Packaged Up For Fedora

Phoronix - Thu, 12/08/2022 - 18:12
While Intel's GPU compute stack for Linux is fully open-source, one area where it still has room for improvement is getting it packaged up on more Linux distributions. The reference binaries published by Intel for their Compute-Runtime and Level Zero components are just Debian/Ubuntu packages but with time -- and as Arc Graphics and other hardware becomes available -- we are seeing more distributions taking a stab at offering up their own package builds...

10 Best PuTTY Alternatives for SSH Remote Connection

Tecmint - Thu, 12/08/2022 - 16:18
The post 10 Best PuTTY Alternatives for SSH Remote Connection first appeared on Tecmint: Linux Howtos, Tutorials & Guides .

Brief: In this tutorial, we explore 10 of the best PuTTY alternatives for SSH clients. Putty is one of the most popular and widely-used SSH and Telnet clients that allows users to log in

The post 10 Best PuTTY Alternatives for SSH Remote Connection first appeared on Tecmint: Linux Howtos, Tutorials & Guides.

7 pro tips for using the GDB step command

opensource.com - Thu, 12/08/2022 - 16:00
7 pro tips for using the GDB step command Alexandra Thu, 12/08/2022 - 03:00

A debugger is software that runs your code and examines any problems it finds. GNU Debugger (GBD) is one of the most popular debuggers, and in this article, I examine GDB's step command and related commands for several common use cases. Step is a widely used command but there are a few lesser known things about it which might be confusing. Also, there are ways to step into a function without actually using the step command itself such as using the less known advance command.

No debugging symbols

Consider a simple example program:

#include
int num() {
return 2;
}
void bar(int i)
{
printf("i = %d\n", i);
}
int main()
{
bar(num());
return 0;
}

If you compile without the debugging symbols first, set a breakpoint on bar and then try to step within it. The GDB gives an error message about no line number information:

gcc exmp.c -o exmp
gdb ./exmp
(gdb) b bar
Breakpoint 1 at 0x401135
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, 0x0000000000401135 in bar ()
(gdb) step
Single stepping until exit from function bar,
which has no line number information.
i = 2
0x0000000000401168 in main ()Stepi

It is still possible to step inside the function that has no line number information but the stepi command should be used instead. Stepi executes just one instruction at a time. When using GDB's stepi command, it's often useful to first do display/i $pc. This causes the program counter value and corresponding machine instruction to be displayed after each step:

(gdb) b bar
Breakpoint 1 at 0x401135
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, 0x0000000000401135 in bar ()
(gdb) display/i $pc
1: x/i $pc
=> 0x401135 <bar+4>: sub $0x10,%rsp

In the above display command, the i stands for machine instructions and $pc is the program counter register.

It can be useful to use info registers and print some register contents:

(gdb) info registers
rax 0x2 2
rbx 0x7fffffffdbc8 140737488346056
rcx 0x403e18 4210200
(gdb) print $rax
$1 = 2
(gdb) stepi
0x0000000000401139 in bar ()
1: x/i $pc
=> 0x401139 <bar+8>: mov %edi,-0x4(%rbp)

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 Complicated function call

After recompiling the example program with debugging symbols you can set the breakpoint on the bar call in main using its line number and then try to step into bar again:

gcc -g exmp.c -o exmp
gdb ./exmp
(gdb) b exmp.c:14
Breakpoint 1 at 0x401157: file exmp.c, line 14.
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());

Now, let's step into bar():

(gdb) step
num () at exmp.c:4
4 return 2;

The arguments for a function call need to be processed before the actual function call, so num() is expected to execute before bar() is called. But how do you step into the bar as was desired? You need to use the finish command and step again:

(gdb) finish
Run till exit from #0 num () at exmp.c:4
0x0000000000401161 in main () at exmp.c:14
14 bar(num());
Value returned is $1 = 2
(gdb) step
bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);Tbreak

The tbreak command sets a temporary breakpoint. It's useful for situations where you don't want to set a permanent breakpoint. For example, if you want to step into a complicated function call like f(g(h()), i(j()), ...) , in such a case you need a long sequence of step/finish/step to step into f . Setting a temporary breakpoint and then using continue can help to avoid using such sequences. To demonstrate this, you need to set the breakpoint to the bar call in main as before. Then set the temporary breakpoint on bar.  As a temporary breakpoint it is automatically removed after being hit:

(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());
(gdb) tbreak bar
Temporary breakpoint 2 at 0x40113c: file exmp.c, line 9.

After hitting the breakpoint on the call to bar and setting a temporary breakpoint on bar, you just need to continue to end up in  bar.

(gdb) continue
Continuing.
Temporary breakpoint 2, bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);Disable command

Alternatively, you could set a normal breakpoint on bar , continue, and then disable this second breakpoint when it's no longer needed. This way you can achieve the same results as with the tbreak with one extra command:

(gdb) b exmp.c:14
Breakpoint 1 at 0x401157: file exmp.c, line 14.
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());
(gdb) b bar
Breakpoint 2 at 0x40113c: file exmp.c, line 9.
(gdb) c
Continuing.
Breakpoint 2, bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);
(gdb) disable 2

As you can see, the info breakpoints  command displays n under Enbwhich means it’s disabled but you can enable it later if it’s needed again.

(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x0000000000401157 in main at exmp.c:14
breakpoint already hit 1 time
2 breakpoint keep n 0x000000000040113c in bar at exmp.c:9
breakpoint already hit 1 time
(gdb) enable 2
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x000000000040116a in main at exmp.c:19
breakpoint already hit 1 time
2 breakpoint keep y 0x0000000000401158 in bar at exmp.c:14
breakpoint already hit 1 timeAdvance location

Another option you can use is an advance command. Instead of tbreak bar ; continue , you can simply do advance bar . This command continues running the program up to the given location.

The other cool thing about advance is that if the location that you try to advance to is not reached, GDB will stop after the current frame's function finishes. Thus, execution of the program is constrained:

Breakpoint 1 at 0x401157: file exmp.c, line 14.
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());
(gdb) advance bar
bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);Skipping a function

Yet another way to step into the bar, avoiding num, is using the skip command:

(gdb) b exmp.c:14
Breakpoint 1 at 0x401157: file exmp.c, line 14.
(gdb) skip num
Function num will be skipped when stepping.
(gdb) r
Starting program: /home/ahajkova/exmp
Breakpoint 1, main () at exmp.c:14
14 bar(num());
(gdb) step
bar (i=2) at exmp.c:9
9 printf("i = %d\n", i);

To know which functions are currently skipped,  info skip is used.  The num function is marked as enabled to be skipped by y:

(gdb) info skip
Num Enb Glob File RE Function
1 y n <none> n num

If skip is not needed any more it can be disabled (and re-enabled later) or deleted altogether. You can add another skip and disable the first one and then delete them all. To disable a certain skip, its number has to be specified, if not specified, each skipis disabled. It works the same for enabling or deleting a skip:

(gdb) skip bar
(gdb) skip disable 1
(gdb) info skip
Num Enb Glob File RE Function
1 n n <none> n num
2 y n <none> n bar
(gdb) skip delete
(gdb) info skip
Not skipping any files or functions.GDB step command

Using GDB's step command is a useful tool for debugging your application. There are several ways to step into even complicated functions, so give these GDB techniques a try next time you're troubleshooting your code.

There are several ways to step into even complicated functions, so give these GDB techniques a try next time you're troubleshooting your code.

Image by:

Pixabay, testbytes, CC0

Linux What to read next GNU Debugger cheat sheet This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Our favorite markup languages for documentation

opensource.com - Thu, 12/08/2022 - 16:00
Our favorite markup languages for documentation Opensource.com Thu, 12/08/2022 - 03:00

Documentation is important for so many reasons. Readable documentation is even more so. In the world of open source software, documentation is how to use or contribute to an application. It's like the rulebook for a game

There are many different types of documentation:

  • Tutorials

  • How-to guides

  • Reference guides

  • Software architecture

  • Product manuals

We asked some of the Opensource.com contributors about their technical documentation workflow, which markup language they preferred, and why they might use one over the other. Here's what they had to say.

AsciiDoc

For the past several years, Markdown has been my standard language. But recently I decided to give AsciiDoc a try. The syntax is not difficult and Gedit on my Linux desktop supports it. I plan to stick with it for a while.

Alan Formy-Duval

In terms of low-syntax markup, I prefer AsciiDoc. I like it because its conversion process is consistent and predictable, with no surprise "flavor" variations to confuse things. I also love that it outputs to Docbook, which is a markup-heavy syntax that I trust for longevity and flexibility.

But the "right" choice tends to be what a project is already using. I wouldn't write in AsciiDoc if a project uses Strawberry-flavored Markdown. Well, to be fair, I might write in AsciiDoc and then convert it to Strawberry-flavored Markdown with Pandoc.

I do think there is a time and place for Markdown. I do find it more readable than AsciiDoc. Links in AsciiDoc:

http://example.com[Example website]

 Links in Markdown:

[Example.com](http://example.com)

The Markdown syntax is intuitive, delivering the information in the same way that I think most of us parse the same data when reading HTML ("Example website…oh, that's blue text, I'll roll over it to see where it goes…it goes to example.com").

In other words, when my audience is a human reader, I do often choose Markdown because its syntax is subtle but it's got enough of a syntax to make conversion possible, so it's still an OK storage format.

AsciiDoc, as minimal as it is, just looks scarier.

If my audience is a computer that's going to parse a file, I choose AsciiDoc.

Seth Kenlon

More great content Free online course: RHEL technical overview Learn advanced Linux commands Download cheat sheets Find an open source alternative Explore open source resources reStructuredText

I'm a big fan of docs as code and how it brings developer tools into the content workflows. It makes it easier to have efficient reviews and collaboration, especially if engineers are contributors. 

I'm also a bit of a markup connoisseur, having written whole books in AsciiDoc for O'Reilly, a lot of Markdown for various platforms, including a thousand posts on my blog. Currently, I'm a reStructuredText convert and maintain some of the tooling in that space. 

Lorna Mitchell

Obligatory mention of reStructuredText. That's my go-to these days as I do a lot of Python programming. It's also been Python's standard for documentation source and code comments for ages.

I like that it doesn't suffer quite so much from the proliferation of nonstandards that Markdown does. That said, I do use a lot of Sphinx features and extensions when working on more complex documentation.

Jeremy Stanley

HTML

I rarely use markup languages if I don't have to.

I find HTML easier to use than other markup languages though.

Rikard Grossman-Nielsen

For me, there are various ways to make documentation. It depends on where the documentation is going to be whether on a website, as part of the software package, or something downloadable.

For Scribus, the internal documentation is in HTML, since an internal browser is used to access it. On a website, you might need to use a Wiki language. For something downloadable you might create a PDF or an EPUB.

I tend to write the documentation in a plain text editor. I might use XHTML, so that I can then import these files into an EPUB maker like Sigil. And, of course, Scribus is my go-to app for making a PDF, though I would probably be importing a text file created with a text editor. Scribus has the advantage of including and precisely controlling placement of graphics.

Markdown has never caught on with me, and I've never tried AsciiDoc.

Greg Pittman

I'm writing a lot of documentation in HTML right now, so I'll put in a plug for HTML. You can use HTML to create websites, or to create documentation. Note that the two are not really the same — when you're creating websites, most designers are concerned about presentation. But when you're writing documentation, tech writers should focus on content.

When I write documentation in HTML, I stick to the tags and elements defined by HTML, and I don't worry about how it will look. In other words, I write documentation in "unstyled" HTML. I can always add a stylesheet later. So if I need to make some part of the text stronger (such as a warning) or add emphasis to a word or phrase, I might use the and tags, like this:

<p><strong>Warning: Lasers!</strong> Do <em>not</em> look into laser with remaining eye.</p>

Or to provide a short code sample within the body of a paragraph, I might write:

<p>The <code>puts</code> function prints some text to the user.</p>

To format a block of code in a document, I use .. like this:

void
print_array(int *array, int size)
  {
  for (int i = 0; i < size; i++) {
  printf("array[%d] = %d\n", i, array[i]);
  }
}

The great thing about HTML is you can immediately view the results with any web browser. And any documentation you write in unstyled HTML can be made prettier later by adding a stylesheet.

Jim Hall

Unexpected: LibreOffice

Back in the 80s and 90s when I worked in System V Unix, SunOS, and eventually Solaris, I used the mm macros with nroff, troff and finally groff. Read about MM using groff_mm (provided you have them installed.)

MM isn't really a markup language, but it feels like one. It is a very semantic set of troff and groff macros. It has most things markup language users would expect—headings, numbered lists, and so on.

My first Unix machine also had Writers' Workbench available on it, which was a boon for many in our organization who had to write technical reports but didn't particularly write in an "engaging manner". A few of its tools have made it to either BSD or Linux—style, diction, and look.

I also recall a standard generalized markup language (SGML) tool that came with, or perhaps we bought for, Solaris in the very early 90s. I used this for awhile, which may explain why I don't mind typing in my own HTML.

I've used Markdown a fair bit, but having said that, I should also be saying "which Markdown", because there are endless flavors and levels of features. I'm not a huge fan of Markdown because of that. I guess if I had a lot of Markdown to do I would probably try to gravitate toward some implementation of CommonMark because it actually has a formal definition. For example, Pandoc supports CommonMark (as well as several others).

I started using AsciiDoc, which I much prefer to Markdown as it avoids the "which version are you using" conversation and provides many useful things. What has slowed me down in the past with respect to AsciiDoc is that for some time it seemed to require installing Asciidoctor—a Ruby toolchain which I was not anxious to install. But these days there are more implementations at least in my Linux distro. Curiously, Pandoc emits AsciiDoc but does not read it.

Those of you laughing at me for not wanting a Ruby toolchain for AsciiDoc but being satisfied with a Haskell toolchain for Pandoc… I hear you.

I blush to admit that I mostly use LibreOffice these days.

Chris Hermansen

Document now!

Documentation can be achieved through many different avenues, as the writers here have demonstrated. It's important to document how to use your code, especially in open source. This ensures that other people can use and contribute to your code properly. It's also wise to tell future users what your code is providing. 

Documentation is critical to open source software projects. We asked our contributors what their favorite markup language is for documentation.

Image by:

Internet Archive Book Images. Modified by Opensource.com. CC BY-SA 4.0

Documentation Opensource.com community What to read next Cheat sheet: Markdown This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. 4576 points United States

Alan has 20 years of IT experience, mostly in the Government and Financial sectors. He started as a Value Added Reseller before moving into Systems Engineering. Alan's background is in high-availability clustered apps. He wrote the 'Users and Groups' and 'Apache and the Web Stack' chapters in the Oracle Press/McGraw Hill 'Oracle Solaris 11 System Administration' book. He earned his Master of Science in Information Systems from George Mason University. Alan is a long-time proponent of Open Source Software.

| Follow AlanFormy_Duval User Attributes Correspondent Open Source Sensei People's Choice Award Gamer Linux SysAdmin Geek Java Apache DevOps Author Comment Gardener Correspondent Contributor Club 28371 points New Zealand (South Island)

Seth Kenlon is a UNIX geek, free culture advocate, independent multimedia artist, and D&D nerd. He has worked in the film and computing industry, often at the same time. He is one of the maintainers of the Slackware-based multimedia production project Slackermedia.

User Attributes Team Open Source Super Star Moderator's Choice Award 2011 100+ Contributions Club Best Interview Award 2017 Author Columnist Contributor Club 77 points UK

Lorna is based in Yorkshire, UK; she is a polyglot programmer as well as a published author and experienced conference speaker. She brings her technical expertise on a range of topics to audiences all over the world with her writing and speaking engagements, always delivered with a very practical slant. Lorna works in Developer Relations at Aiven and in her spare time she blogs at lornajane.net.

| Follow lornajane Open Enthusiast Author 217 points Kill Devil Hills, NC, USA

A long-time computer hobbyist and technology generalist, Jeremy Stanley has worked as a Unix and GNU/Linux sysadmin for nearly three decades focusing on information security, Internet services, and data center automation. He’s a root administrator for the OpenDev Collaboratory, a maintainer of the Zuul project, and serves on the OpenStack vulnerability management team. Living on a small island in the Atlantic, in his spare time he writes free software, hacks on open hardware projects and embedded platforms, restores old video game systems, and enjoys articles on math theory and cosmology.

Open Minded People's Choice Award Author 6961 points Vancouver, Canada

Seldom without a computer of some sort since graduating from the University of British Columbia in 1978, I have been a full-time Linux user since 2005, a full-time Solaris and SunOS user from 1986 through 2005, and UNIX System V user before that.

On the technical side of things, I have spent a great deal of my career as a consultant, doing data analysis and visualization; especially spatial data analysis. I have a substantial amount of related programming experience, using C, awk, Java, Python, PostgreSQL, PostGIS and lately Groovy. I'm looking at Julia with great interest. I have also built a few desktop and web-based applications, primarily in Java and lately in Grails with lots of JavaScript on the front end and PostgreSQL as my database of choice.

Aside from that, I spend a considerable amount of time writing proposals, technical reports and - of course - stuff on https://www.opensource.com.

User Attributes Correspondent Open Sourcerer People's Choice Award 100+ Contributions Club Emerging Contributor Award 2016 Author Comment Gardener Correspondent Columnist Contributor Club 152 points Sweden

Hello my name is Richard and I’m an intermediate Linux user diagnosed with ADHD and
Asperger's.

On a daily basis I use Linux for java programming, productivity and gaming.
I’m also a trained teacher, male, 39yrs of age, living in Sweden. I first started using Linux in late 90s. One of the first distros I installed was Redhat due to it's ease of use.
Today I mostly use Ubuntu and Manjaro.

I'm among other things interested in how Linux and open source software can be made more accessible to people with conditions like ADHD, Asperger's and Dyslexia.
mind.

I use accessibility software due to being diagnosed with Asperger's and ADHD.
I mostly use speech synthesis to find spelling errors and calendar software with accommodations.

I can be reached at:
rikardgn@gmail.com

Open Minded Author Contributor Club 4538 points Louisville, KY

Greg is a retired neurologist in Louisville, Kentucky, with a long-standing interest in computers and programming, beginning with Fortran IV in the 1960s. When Linux and open source software came along, it kindled a commitment to learning more, and eventually contributing. He is a member of the Scribus Team.

Open Source Sensei Emerging Contributor Award 2017 Awesome Article Award 2019 Python Author Contributor Club 5069 points Minnesota

Jim Hall is an open source software advocate and developer, best known for usability testing in GNOME and as the founder + project coordinator of FreeDOS. At work, Jim is CEO of Hallmentum, an IT executive consulting company that provides hands-on IT Leadership training, workshops, and coaching.

| Connect jimfhall User Attributes Correspondent Open Sourcerer People's Choice Award People's Choice Award 2018 Author Correspondent Contributor Club Register or Login to post a comment.

Manage your file system from the Linux terminal

opensource.com - Thu, 12/08/2022 - 16:00
Manage your file system from the Linux terminal Seth Kenlon Thu, 12/08/2022 - 03:00

I tend to enjoy lightweight applications. They're good for low spec computers, for remote shells, for the impatient user (OK, I admit, that's me), and for the systems we scrap together to fight the inevitable zombie apocalypse. In my search for a perfect blend of a lightweight application with all the modern conveniences we've learned from experience, I stumbled across a file manager called nnn. The nnn file manager exists in a terminal only, but it feels like a modern keyboard-driven application with intuitive actions and easy navigation.

Image by:

(Seth Kenlon, CC BY-SA 4.0)

Install nnn

On Linux, you may find nnn in your Linux distribution's software repository. For instance, on Debian:

$ sudo apt install nnn

If your repository doesn't have nnn available, you can download a package for your distribution from OBS or from the project Git repository.

On macOS, use Homebrew or MacPort.

Using nnn

Launch nnn from a terminal:

$ nnn

Your terminal is now the nnn interface, and by default it lists the contents of your current directory:

1 2 3 4 ~

Desktop/
Documents/
Downloads/
Music/
Pictures/
Public/
Templates/
Videos/




4/8 2022-12-01 15:54 drwxr-xr-x 6B

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

At the top of the nnn interface are tabs (called a "context" in nnn terminology), numbered one to four.

At the bottom of the nnn interface, there are ownership and permission details about your current selection.

Use either the Up and Down arrow keys or the k and j keys (as in Vim) to change your selection. Use the Right arrow key, Return, or the l key to enter a directory or to open a file. Use the Left arrow key or h to back out of a directory.

That's it for navigation. It's easier than any graphical file manager because there aren't any widgets that get in the way. There's no need to Tab over buttons, you just use the arrow keys or the QWERTY home row.

Open a file

One of the reasons you use a file manager is to find a file and then open it. Your desktop already has default applications set, and nnn inherits this knowledge, so press Return or Right arrow to open a file in its default application.

Should you need to open a file in something other than its default application, press = instead, and then type the name of the application in the prompt at the bottom of the nnn interface.

Copy a file

To copy a file or any number of files, you must first select a file to copy, then navigate to its intended destination, and finally invoke the copy command. Thanks to nnn's context control (those are the numbers at the top of the screen, and you can think of them as tabs in a web browser), this is a quick process.

  1. First, select the file you want to copy and press Spacebar to select the file. It's marked with a plus sign (+) to indicate its selected state.

  2. Press 2 to change to a new context.

  3. Navigate to the target directory and press p to copy.

Move a file

Moving files is the same process as copying a file, but the keyboard shortcut for the action is v.

Selecting files

There are a few ways to mark selections in nnn. The first is manual selection. You find a file you want to select, and then press Spacebar to mark it as selected. Press Spacebar again to deselect it.

One selection doesn't cancel another, so you can select several files manually, but that can become tedious. Another way to select many files at once is to "mark in " and "mark out". To mark a selection, press m on the first file you want to select, and then use your arrow keys to move to the last file you want to select. Press m again to close the selection:

1 2 3 4 ~

+Desktop/
+Documents/
+Downloads/
+Music/
+Pictures/
+Public/
Templates/
Videos/




6/8 [ +6 ] 2022-12-01 15:54 drwxr-xr-x 6B

Finally, the third way to select files is to press a to select all. Use A to invert the selection (in this case, to select none.)

Creating an archive

To create an archive of a file or a selection of files, press z. At the bottom of the nnn interface, you're prompted to choose between your current item of your selection. Then you're prompted for a file name. Luckily, nnn is a smart application and derives its file type from the name you provide. If you name your archive example.tar.xz then nnn creates a TAR archive with lzma compression, but if you name it example.zip then it creates a ZIP file.

You can verify the file type yourself by pressing the f key with your new archive selected:

  File: /home/tux/Downloads/example.zip
  Size: 184707          Blocks: 368        IO Block: 4096   regular file
Device: fd00h/64768d    Inode: 17842380    Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1002/     tux)   Gid: ( 1002/     tux)
Context: unconfined_u:object_r:user_home_t:s0
Access: 2022-09-20 15:12:09.770187616 +1200
Modify: 2022-09-20 15:12:09.775187704 +1200
Change: 2022-09-20 15:12:09.775187704 +1200
 Birth: 2022-09-20 15:12:09.770187616 +1200
Zip archive data, at least v2.0 to extract
application/zip; charset=binaryCancel an action

When you find yourself backed into a corner and need to press a panic button, use the Esc key. (This is likely to be the single most confusing keyboard shortcut for a longtime terminal user who's accustomed to Ctrl+C.)

Never close nnn

To quit nnn, press Q at any time.

It's a very capable file manager, with functions for symlinks, FIFO, bookmarks, batch renaming, and more. For a full list of what nnn can do, press the ? key.

The most clever feature is the shell function. Press ! to open a shell over the nnn interface. You'll forget nnn is there, until you type exit and you find yourself back in the nnn interface. It's that easy to leave nnn open all the time, so you can always have quick access to the fastest lightweight file management you're likely to experience.

The nnn file manager on Linux exists in a terminal only, but it feels like a modern keyboard-driven application with intuitive actions and easy navigation.

Image by:

iradaturrahmat via Pixabay, CC0

Linux What to read next This work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License. Register or Login to post a comment.

Pages