简体   繁体   English

在Linux中,如何从终端在文件夹内创建文件夹?

[英]In Linux How do I create a folder inside folder from terminal?

I want to create a folder tree like below 我想创建一个如下的文件夹树

2006
    -seattle
           -plans
                 -marketing

Is there a linux command to do it? 有Linux命令可以做到吗?

Following worked for me. 以下对我有用。 Thanks to linfo 感谢linfo

mkdir -p 2006/seattle/plans/marketing

However there could be more effective ones. 但是,可能会有更有效的方法。

To create sub-folders in a Terminal, we generally prefer 要在终端中创建子文件夹,我们通常更喜欢

mkdir -p h/{hh,hhh/hhhh}

Output Folder Structure 输出文件夹结构

h/

hh hhh/

       hhhh

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在linux Web服务器上创建快捷方式文件夹? - How do I create a shortcut folder on a linux web server? 在 linux 终端中,如何显示文件夹的上次修改日期,同时考虑其内容? - in linux terminal, how do I show the folder's last modification date, taking its content into consideration? 如何使用Linux终端从其他文件夹运行Java文件 - How to run a java file from a different folder using linux terminal 如何使用C在Linux的`/ etc`文件夹中创建文件? - How to create a file inside the `/etc` folder in Linux with C? 如何在Linux中使用Permisson创建文件夹 - How To Create Folder In Linux With Permisson 如何在Linux中找到imagemagick temp文件夹? - How do I find imagemagick temp folder in linux? 当文件名中包含Linux文件夹中的特定字符时,如何删除文件 - how do I remove files when the filename has specific characters from linux folder 如何使用 python 将几个文件夹从一个目录复制到 Linux 中的另一个文件夹 - how do I copy over a few folders from one directory into another folder in Linux using python 如何使用linux终端计算文件夹中的不同文件类型? - How can I count the different file types within a folder using linux terminal? 从终端搜索/查找linux中具有整数的名称的文件夹 - search/find a folder that has a name with integer numbers in linux from terminal
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM