securitybreach Posted May 5, 2015 Share Posted May 5, 2015 Break the GUI: Learn how to manage files and directories without having to open the file manager. This is the third article in the 'Break the GUI' series, and it's all about managing files and directories without having to open the file manager. One great advantage of using the command line interface (CLI) to perform such tasks is that you bypass the limitations of the file manager that comes with your distro. CLI is faster, less resource intensive, and as a result, more efficient. Learning CLI has its own perks: it also enables you to run your own headless servers. I assume that you are familiar with the basics of command line, if not, then check out this article by Jack Wallen, "How to Move Files Using Linux Commands or File Managers." In this article, we will learn how to do 'almost' everything with your files and directory without a file manager. Without further ado, let's get started. To make it easier for users to understand, I am presenting a problem. I take a lot of photos and download them to my computer. Now all of those photos are piled up in the 'Downloads' directory and I want to organize my files. How to create new directories with command line There are two ways to do this. Either _cd_ to the directory where you want to create a new folder or use the full path. Let's assume I have pics from the previous LinuxCon and I want to save all those images to a directory called 'Linux_Con' inside another to-be-created directory 'images', inside one of my partitions mounted at '/media/4tb'. Since the directory 'images' doesn't exist yet, we will use the '-p' option with the mkdir command: mkdir -p /media/4tb/images/linux_con The '-p' option will create all the directories given in the command in the parent-child order. If we used the mkdir command without '-p' and since 'images' directory didn't exit, it would throw an error. The second method is cd to the parent directory, which in this case is '4tb': cd /media/4tb https://www.linux.co...e-command-line/ 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.