Bonus. Midnight Commander: dual-panel file manager

Basics of Linux Command Line Summary and bonus lecture
6 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$69.99
List Price:  $99.99
You save:  $30
€65.45
List Price:  €93.51
You save:  €28.05
£55.31
List Price:  £79.03
You save:  £23.71
CA$95.87
List Price:  CA$136.97
You save:  CA$41.09
A$105.23
List Price:  A$150.33
You save:  A$45.10
S$94.85
List Price:  S$135.50
You save:  S$40.65
HK$546.28
List Price:  HK$780.43
You save:  HK$234.15
CHF 62.53
List Price:  CHF 89.34
You save:  CHF 26.80
NOK kr738.84
List Price:  NOK kr1,055.54
You save:  NOK kr316.69
DKK kr488.13
List Price:  DKK kr697.37
You save:  DKK kr209.23
NZ$114.35
List Price:  NZ$163.36
You save:  NZ$49.01
د.إ257.07
List Price:  د.إ367.26
You save:  د.إ110.19
৳8,206.42
List Price:  ৳11,723.96
You save:  ৳3,517.54
₹5,848.74
List Price:  ₹8,355.70
You save:  ₹2,506.96
RM329.86
List Price:  RM471.25
You save:  RM141.39
₦104,145.12
List Price:  ₦148,785.12
You save:  ₦44,640
₨19,451.01
List Price:  ₨27,788.35
You save:  ₨8,337.33
฿2,566.28
List Price:  ฿3,666.28
You save:  ฿1,099.99
₺2,297.77
List Price:  ₺3,282.67
You save:  ₺984.90
B$380.19
List Price:  B$543.15
You save:  B$162.96
R1,257.29
List Price:  R1,796.21
You save:  R538.91
Лв127.88
List Price:  Лв182.70
You save:  Лв54.81
₩97,243.40
List Price:  ₩138,925.10
You save:  ₩41,681.70
₪263.13
List Price:  ₪375.92
You save:  ₪112.78
₱4,117.61
List Price:  ₱5,882.56
You save:  ₱1,764.94
¥11,182.65
List Price:  ¥15,975.90
You save:  ¥4,793.25
MX$1,267.57
List Price:  MX$1,810.89
You save:  MX$543.32
QR254.73
List Price:  QR363.91
You save:  QR109.18
P943.11
List Price:  P1,347.37
You save:  P404.25
KSh9,044.72
List Price:  KSh12,921.58
You save:  KSh3,876.86
E£3,339.22
List Price:  E£4,770.52
You save:  E£1,431.30
ብር4,029.95
List Price:  ብር5,757.32
You save:  ብር1,727.37
Kz59,806.45
List Price:  Kz85,441.45
You save:  Kz25,635
CLP$65,858.49
List Price:  CLP$94,087.59
You save:  CLP$28,229.10
CN¥508.21
List Price:  CN¥726.05
You save:  CN¥217.83
RD$4,122.17
List Price:  RD$5,889.07
You save:  RD$1,766.89
DA9,412.67
List Price:  DA13,447.25
You save:  DA4,034.58
FJ$156.97
List Price:  FJ$224.25
You save:  FJ$67.28
Q541.95
List Price:  Q774.24
You save:  Q232.29
GY$14,603.51
List Price:  GY$20,863.05
You save:  GY$6,259.54
ISK kr9,756.60
List Price:  ISK kr13,938.60
You save:  ISK kr4,182
DH695.57
List Price:  DH993.71
You save:  DH298.14
L1,245.82
List Price:  L1,779.82
You save:  L534
ден4,023.76
List Price:  ден5,748.47
You save:  ден1,724.71
MOP$562.43
List Price:  MOP$803.51
You save:  MOP$241.07
N$1,257.72
List Price:  N$1,796.82
You save:  N$539.10
C$2,571.12
List Price:  C$3,673.19
You save:  C$1,102.06
रु9,331.52
List Price:  रु13,331.31
You save:  रु3,999.79
S/265.79
List Price:  S/379.71
You save:  S/113.92
K272.41
List Price:  K389.17
You save:  K116.76
SAR262.58
List Price:  SAR375.14
You save:  SAR112.55
ZK1,779.25
List Price:  ZK2,541.90
You save:  ZK762.64
L325.62
List Price:  L465.20
You save:  L139.57
Kč1,631.83
List Price:  Kč2,331.28
You save:  Kč699.45
Ft25,947.39
List Price:  Ft37,069.29
You save:  Ft11,121.90
SEK kr735.41
List Price:  SEK kr1,050.64
You save:  SEK kr315.22
ARS$63,379.44
List Price:  ARS$90,545.94
You save:  ARS$27,166.50
Bs482.57
List Price:  Bs689.42
You save:  Bs206.84
COP$291,390.14
List Price:  COP$416,289.47
You save:  COP$124,899.33
₡36,507.14
List Price:  ₡52,155.29
You save:  ₡15,648.15
L1,727.59
List Price:  L2,468.10
You save:  L740.50
₲525,730.21
List Price:  ₲751,075.35
You save:  ₲225,345.14
$U2,750.95
List Price:  $U3,930.09
You save:  $U1,179.14
zł283.09
List Price:  zł404.43
You save:  zł121.34
Already have an account? Log In

Transcript

In this bonus lecture, I would like to draw your attention to a tool that saved me a lot of time for file navigation file management. We'll talk about me that commander that could help you navigation of a file system in doing most common file operations using a text interface. Yet it is sometimes easier to do operations than impure text based commands, you will see what I mean. I have made that command installed already in my system, but if it's not available for you make sure it will install the package most probably called MC using your package manager. I can start it by executing the MC command. I'll make the window a bit bigger.

Midnight commander is a console application with a text user interface. It was created back in 1994 is a free cross platform clone of Norton commander. There are three parts of midnight commander that I would like to tell you about. These are the main interface window that you can see now, as well as embedded file viewer and editor. The main interface consists of two panels Switch display the content of two selected directories. You can use tab to switch between two panels, and arrow keys to select a particular file or directory.

You can also select multiple files using insert. I could as well search in the list of files using Ctrl S. And I will look at the work directory. You could make file operations such as copy moving in removing files and midnight commander. I could swap the two panels using Ctrl u combination. And I would like to open the work directory also on the second panel. I will search again using Ctrl S. I would now make copies of my file using f5.

For instance, I want to copy rando to Sage into sub one. So I can copy using your five and now I would like to copy both files into sub two directories I can also remove the files using f8. And I can create sub directories using f7. I could also search for files starting with the current directory using alt question mark, it might be that you have to press Alt and Shift combinations along with the question mark symbol. I will now search for all files with a.sh extension. And I would print them with the list of found files.

I can quit the find File menu with escape. I could go to the menu of midnight commander with f9. And I could see what operations I can make from the drop down menus. I could for instance, compare two directories. I could also have a key combination for that, but it's not so easy to remember them from the first try. So most of these commands are also available from the menu.

See the two directories. I can to different it highlighted me the difference on the left panel. Me that command also includes an embedded file viewer called MC view, I can open it using the functional key f3 on a file. Navigation happens the same way is the last or nano editors can search for some text using f7. If I want to see the hex codes for each character of this file, I can also press f4 you can always switch the view back using your four again and I can quit using f3. Now there is one more option which is called unwrap.

If I choose a file that contains lines that are longer than fits on the screen, I can press f2 combination and then unwrap it so that if I go to the right from the screen, I can see that this line is really long. There are also a few more hotkeys listed in the bottom of the screen available for the MC viewer. I could also edit a file using an embedded editor called MC edit. navigation is the same I can use up and down again, I can mark some text pressing f3 pressing f3 again to finish selection and I can paste it in some other parts of the file using f5. I could also move the text by pressing f6 and I could also maybe select something else and delete it using f8. I could also clean the complete line using Ctrl y and I can undo my operation using Ctrl u search is also available in the viewer depending on the configuration for The Midnight commander, the editor might have code highlighting.

In my example, I do have code highlighting available for the shell scripts. And you see the different colors for different parts of the strains. If you would like to work with source code, and code highlighting is not available for you, you can simply google it for the programming language or use any type of Linux you have. And again, there are more key combination that available for the editor listed in the bottom of the screen. Now I could quit the editor by either pressing escape twice, and to save it or not, and I don't care so I will choose No. I can quit the midnight commander by pressing of time as you can see from the bottom of the screen, but in my case, this is also a combination for the desktop environment to use.

So in this case, I can have a trick and I can press escape and zero which will also quit me that commander. If you like the way that navigation works in midnight commander and you like the interface, I suggest you have a closer look. You can go For hockey's available for the file operations, images, try it yourself. I know that some people like it and some people really don't like it. To me personally, it was an easier way to get used to the file system navigation and have the dual panel so that it can quickly navigate in the file system and copy files. Maybe it will also work for you.

In this lecture, we'll look at the midnight commander, which is a convenient File Manager. It has easy and intuitive ways to navigating in the file system. It has an internal viewer and editor. It has even code highlighting for the source code. And indeed internally, it has lots of other functions that are available from the menu for you. So feel free to explore it more

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.