All Questions
12
questions
0
votes
2
answers
2k
views
move and make directory
I know its a big classical but I didn't found the exact situation that concerns me
I need a mkdir+mv command that can be invoked like that :
mvdir /home/user/Documents/irs.pdf /mnt/work/45/223/insight/...
2
votes
4
answers
27k
views
Creating directory in bulk using mkdir in shell script
I am trying to create directory in bulk using mkdir through shell script
below is the script
#!bin/bash
mkdir /tmp/report*/testfolder*/testdoank
when i run it i got an error
-bash: ./makefolder.sh: ...
0
votes
2
answers
112
views
Can't remove space from beginning of variable
I am trying to crate a folder with the label and uuid of a media device plugged in as its name, on another flash drive which I am using to log.
I have the following code:
LOGDEVICELABEL=...
4
votes
2
answers
2k
views
Sort files in a folder into dated folders
I am trying to organize my webcam picture files into folders otherwise I get thousands of pictures in one folder.
I have a script foscam-move.sh (from Create sub-directories and organize files by ...
0
votes
2
answers
327
views
Create directory name based on other other directories
I have directories:
Foo
Fee
but I also have some directories with names like:
Ipsum - Lorem
Dolor - Sit
If the directory does not contain a hyphen is should be ignored
If the directory does ...
0
votes
1
answer
3k
views
Creating multiple directories using a parameter in a shell script [duplicate]
I'm trying to make a bash script that would make a series of directories
and requesting a parameter of how many directories should be created.
$> ./createDir.sh 5
$> ls
ex_01
ex_02
ex_03
...
1
vote
1
answer
3k
views
alias to make a new directory and go to it [duplicate]
So here I've created, or at least tried to create an alias for a command that accepts a command-line argument, makes a new directory with that name, and goes to it.
alias newfolder='mkdir $2 ; cd "$(...
1
vote
1
answer
3k
views
Make a directory named with date
I want to make a directory with the name being the day. I have this variable:
[Desktop]: $dia
21/02/16
created this way:
dia=$'date +%d/%m/%y'
I'm trying to make a new directory this way:
mkdir "$...
6
votes
2
answers
107k
views
Creating directory with space in name [duplicate]
I'm trying to create a directory which has space in name e.g. "user test"
when I fire mkdir -p "user test" it works for me.
When I put "user test" in variable mkdir fails, it creates "user and test" ...
4
votes
2
answers
5k
views
Is there any Linux command to create a new file in a folder and auto create this folder if not exist? [duplicate]
I know this problem can solve by use combine mkdir and touch commands. But I want to know is there any other solution only use one command.
6
votes
2
answers
11k
views
Make parent directories while creating a new file
I am aware of the fact that mkdir -p /path/to/new/directory will create a new directory, along with parent directory (if needed ).
If I have to create a new file, along with it's parent directories (...
47
votes
9
answers
20k
views
mkdir -p for files
mkdir -p will create a directory; it will also make parent directories as needed.
Does a similar command exist for files, that will create a file and parent directories as needed?