Find files that match multiple criteria and copy them to a folder [closed]Copy all files whose hashes don't matchFind files with a specific 2-line pattern using awkResize multiple files and rename them properlyMove files that are different to another folderHow can I copy files with common names and paste them into another folder?Matching two files and keeping blocks that contain the match
What's the story to "WotC gave up on fixing Polymorph"?
Do we know the situation in Britain before Sealion (summer 1940)?
Is it true that, "just ten trading days represent 63 per cent of the returns of the past 50 years"?
reverse a list of generic type
What do the 2 last numbers between '()' mean in 227 response to “ls” command?
Cut a cake into 3 equal portions with only a knife
Where Does VDD+0.3V Input Limit Come From on IC chips?
Going to France with limited French for a day
Did Apollo carry and use WD40?
How to deal with my team leader who keeps calling me about project updates even though I am on leave for personal reasons?
Why are there two fundamental laws of logic?
Norwegian refuses EU delay (4.7 hours) compensation because it turned out there was nothing wrong with the aircraft
How can an attacker use robots.txt?
The 100 soldier problem
How to draw this figure using Tikz?
Creating raster where each cell records distance to sea?
How can I repair this gas leak on my new range? Teflon tape isn't working
I reverse the source code, you negate the output!
What spells are on the ranger spell list and not the druid spell list?
What causes the traces to wrinkle like this and should I be worried
Writing a letter of recommendation for a mediocre student
Is it impolite to ask for halal food when traveling to and in Thailand?
Is it a good idea to leave minor world details to the reader's imagination?
What are the benefits and disadvantages if a creature has multiple tails, e.g., Kyuubi or Nekomata?
Find files that match multiple criteria and copy them to a folder [closed]
Copy all files whose hashes don't matchFind files with a specific 2-line pattern using awkResize multiple files and rename them properlyMove files that are different to another folderHow can I copy files with common names and paste them into another folder?Matching two files and keeping blocks that contain the match
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm new to this forum and hope someone will be able to help me.
I'm MacOS user.
I have a Folder A with about 5000 files. They are named as described below:
Booking #0001 - PLACED
Booking #0001 - PREPAID
Booking #0001 - PAID
Booking #0002 - PLACED
Booking #0002 - CANCELLED
Booking #0003 - PLACED
Booking #0003 - PREPAID
Booking #0003 - PAID
Booking #0004 - PLACED
Booking #0004 - PREPAID
Booking #0004 - PAID
Booking #0005 - PLACED
Booking #0005 - PREPAID
Booking #0005 - PAID
Booking #0006 - PLACED
Booking #0006 - CANCELLED
...
Booking #NNNN - PLACED
I have a list of booking numbers (0002, 0007, 0012, 0899, ..., NNNN) and I need files that contain those numbers (no matter if they are -PLACED, -PAID, or -CANCELLED) be copied to Folder B.
Doing that manually will require hundreds of hours and mistakes are very possible.
I'm looking for a solution to do that with terminal command.
I would very much appreciate a step-by-step guidance if that requires more than just one terminal command, or any other help.
command-line
closed as off-topic by dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel Apr 16 at 14:55
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel
add a comment
|
I'm new to this forum and hope someone will be able to help me.
I'm MacOS user.
I have a Folder A with about 5000 files. They are named as described below:
Booking #0001 - PLACED
Booking #0001 - PREPAID
Booking #0001 - PAID
Booking #0002 - PLACED
Booking #0002 - CANCELLED
Booking #0003 - PLACED
Booking #0003 - PREPAID
Booking #0003 - PAID
Booking #0004 - PLACED
Booking #0004 - PREPAID
Booking #0004 - PAID
Booking #0005 - PLACED
Booking #0005 - PREPAID
Booking #0005 - PAID
Booking #0006 - PLACED
Booking #0006 - CANCELLED
...
Booking #NNNN - PLACED
I have a list of booking numbers (0002, 0007, 0012, 0899, ..., NNNN) and I need files that contain those numbers (no matter if they are -PLACED, -PAID, or -CANCELLED) be copied to Folder B.
Doing that manually will require hundreds of hours and mistakes are very possible.
I'm looking for a solution to do that with terminal command.
I would very much appreciate a step-by-step guidance if that requires more than just one terminal command, or any other help.
command-line
closed as off-topic by dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel Apr 16 at 14:55
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel
1
In what form is the "list of booking numbers"? Is it a file with one number per line? Something else?
– John1024
Apr 15 at 17:27
2
"I'm MacOS user." <--You should post this question on unix.stackexchange.com. This site is for Ubuntu and Macs are not Ubuntu.
– John1024
Apr 15 at 17:32
list of booking number is currently in excel table format, so I can easily make it a .txt file with one number per line
– Mikhail
Apr 15 at 17:32
it needed I can make them be in a row separated by what ever symbol.
– Mikhail
Apr 15 at 17:33
I can also put "-o -iname" or any other code/text between the booking numbers
– Mikhail
Apr 15 at 17:34
add a comment
|
I'm new to this forum and hope someone will be able to help me.
I'm MacOS user.
I have a Folder A with about 5000 files. They are named as described below:
Booking #0001 - PLACED
Booking #0001 - PREPAID
Booking #0001 - PAID
Booking #0002 - PLACED
Booking #0002 - CANCELLED
Booking #0003 - PLACED
Booking #0003 - PREPAID
Booking #0003 - PAID
Booking #0004 - PLACED
Booking #0004 - PREPAID
Booking #0004 - PAID
Booking #0005 - PLACED
Booking #0005 - PREPAID
Booking #0005 - PAID
Booking #0006 - PLACED
Booking #0006 - CANCELLED
...
Booking #NNNN - PLACED
I have a list of booking numbers (0002, 0007, 0012, 0899, ..., NNNN) and I need files that contain those numbers (no matter if they are -PLACED, -PAID, or -CANCELLED) be copied to Folder B.
Doing that manually will require hundreds of hours and mistakes are very possible.
I'm looking for a solution to do that with terminal command.
I would very much appreciate a step-by-step guidance if that requires more than just one terminal command, or any other help.
command-line
I'm new to this forum and hope someone will be able to help me.
I'm MacOS user.
I have a Folder A with about 5000 files. They are named as described below:
Booking #0001 - PLACED
Booking #0001 - PREPAID
Booking #0001 - PAID
Booking #0002 - PLACED
Booking #0002 - CANCELLED
Booking #0003 - PLACED
Booking #0003 - PREPAID
Booking #0003 - PAID
Booking #0004 - PLACED
Booking #0004 - PREPAID
Booking #0004 - PAID
Booking #0005 - PLACED
Booking #0005 - PREPAID
Booking #0005 - PAID
Booking #0006 - PLACED
Booking #0006 - CANCELLED
...
Booking #NNNN - PLACED
I have a list of booking numbers (0002, 0007, 0012, 0899, ..., NNNN) and I need files that contain those numbers (no matter if they are -PLACED, -PAID, or -CANCELLED) be copied to Folder B.
Doing that manually will require hundreds of hours and mistakes are very possible.
I'm looking for a solution to do that with terminal command.
I would very much appreciate a step-by-step guidance if that requires more than just one terminal command, or any other help.
command-line
command-line
edited Apr 15 at 22:26
dessert
29.1k7 gold badges87 silver badges120 bronze badges
29.1k7 gold badges87 silver badges120 bronze badges
asked Apr 15 at 17:23
MikhailMikhail
41 bronze badge
41 bronze badge
closed as off-topic by dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel Apr 16 at 14:55
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel
closed as off-topic by dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel Apr 16 at 14:55
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel
closed as off-topic by dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel Apr 16 at 14:55
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – dessert, Florian Diesch, Jacob Vlijm, Eric Carvalho, karel
1
In what form is the "list of booking numbers"? Is it a file with one number per line? Something else?
– John1024
Apr 15 at 17:27
2
"I'm MacOS user." <--You should post this question on unix.stackexchange.com. This site is for Ubuntu and Macs are not Ubuntu.
– John1024
Apr 15 at 17:32
list of booking number is currently in excel table format, so I can easily make it a .txt file with one number per line
– Mikhail
Apr 15 at 17:32
it needed I can make them be in a row separated by what ever symbol.
– Mikhail
Apr 15 at 17:33
I can also put "-o -iname" or any other code/text between the booking numbers
– Mikhail
Apr 15 at 17:34
add a comment
|
1
In what form is the "list of booking numbers"? Is it a file with one number per line? Something else?
– John1024
Apr 15 at 17:27
2
"I'm MacOS user." <--You should post this question on unix.stackexchange.com. This site is for Ubuntu and Macs are not Ubuntu.
– John1024
Apr 15 at 17:32
list of booking number is currently in excel table format, so I can easily make it a .txt file with one number per line
– Mikhail
Apr 15 at 17:32
it needed I can make them be in a row separated by what ever symbol.
– Mikhail
Apr 15 at 17:33
I can also put "-o -iname" or any other code/text between the booking numbers
– Mikhail
Apr 15 at 17:34
1
1
In what form is the "list of booking numbers"? Is it a file with one number per line? Something else?
– John1024
Apr 15 at 17:27
In what form is the "list of booking numbers"? Is it a file with one number per line? Something else?
– John1024
Apr 15 at 17:27
2
2
"I'm MacOS user." <--You should post this question on unix.stackexchange.com. This site is for Ubuntu and Macs are not Ubuntu.
– John1024
Apr 15 at 17:32
"I'm MacOS user." <--You should post this question on unix.stackexchange.com. This site is for Ubuntu and Macs are not Ubuntu.
– John1024
Apr 15 at 17:32
list of booking number is currently in excel table format, so I can easily make it a .txt file with one number per line
– Mikhail
Apr 15 at 17:32
list of booking number is currently in excel table format, so I can easily make it a .txt file with one number per line
– Mikhail
Apr 15 at 17:32
it needed I can make them be in a row separated by what ever symbol.
– Mikhail
Apr 15 at 17:33
it needed I can make them be in a row separated by what ever symbol.
– Mikhail
Apr 15 at 17:33
I can also put "-o -iname" or any other code/text between the booking numbers
– Mikhail
Apr 15 at 17:34
I can also put "-o -iname" or any other code/text between the booking numbers
– Mikhail
Apr 15 at 17:34
add a comment
|
1 Answer
1
active
oldest
votes
If the numbers are one-per-line in file numbers
, try:
while read -r num; do mv *"$num"* /path/to/folder2; done <numbers
Example
Let's start in a directory with these files:
$ ls
Booking #0001 - PAID Booking #0002 - PLACED Booking #0004 - PAID Booking #0005 - PLACED numbers
Booking #0001 - PLACED Booking #0003 - PAID Booking #0004 - PLACED Booking #0005 - PREPAID
Booking #0001 - PREPAID Booking #0003 - PLACED Booking #0004 - PREPAID Booking #0006 - CANCELLED
Booking #0002 - CANCELLED Booking #0003 - PREPAID Booking #0005 - PAID Booking #0006 - PLACED
And folder2 is empty:
$ ls ../folder2
$
File numbers
looks like:
$ cat numbers
0002
0004
Now, run our command:
$ while read -r num; do mv *"$num"* ../folder2; done <numbers
Afterward, our current directory has only these files:
$ ls
Booking #0001 - PAID Booking #0003 - PAID Booking #0005 - PAID Booking #0006 - CANCELLED
Booking #0001 - PLACED Booking #0003 - PLACED Booking #0005 - PLACED Booking #0006 - PLACED
Booking #0001 - PREPAID Booking #0003 - PREPAID Booking #0005 - PREPAID numbers
And folder2 now has these files:
$ ls ../folder2
Booking #0002 - CANCELLED Booking #0002 - PLACED Booking #0004 - PAID Booking #0004 - PLACED Booking #0004 - PREPAID
John, thank you very much, I'm going to test it immediately!
– Mikhail
Apr 15 at 17:47
Sorry if my questions look too stupid, but I need to ask them to make sure I do everything correct: 1). My folder2 is located here: Macintosh HD ▸ Users ▸ Mikhail ▸ Documents ▸ Folder2 Would it be correct to indicate path to folder2 like this: /Users/Mikhail/Documents/Folder2 2). $ ls and $ ls ../folder2 $ are these commands to run? 3). where should I place numbers file? should it be .txt file?
– Mikhail
Apr 15 at 17:59
The$
is supposed to represent the prompt on the command line. Don't type it. The commandls
shows the list of file. For example, to see if your path is correct, runls /Users/Mikhail/Documents/Folder2
and see if the correct files show up in the output. Put the numbers file in FolderA and you should be in FolderA when you start the commands.
– John1024
Apr 15 at 18:06
ls /Users/MikhailMaletkin/Documents/Folder1 works perfectly it shows list of all files! I'm on the right way!
– Mikhail
Apr 15 at 18:16
1
Got it! Thanks for trying to help me. I was deeply touched with your readiness to help and your patience in teaching me all the basics.
– Mikhail
Apr 15 at 21:31
|
show 33 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
If the numbers are one-per-line in file numbers
, try:
while read -r num; do mv *"$num"* /path/to/folder2; done <numbers
Example
Let's start in a directory with these files:
$ ls
Booking #0001 - PAID Booking #0002 - PLACED Booking #0004 - PAID Booking #0005 - PLACED numbers
Booking #0001 - PLACED Booking #0003 - PAID Booking #0004 - PLACED Booking #0005 - PREPAID
Booking #0001 - PREPAID Booking #0003 - PLACED Booking #0004 - PREPAID Booking #0006 - CANCELLED
Booking #0002 - CANCELLED Booking #0003 - PREPAID Booking #0005 - PAID Booking #0006 - PLACED
And folder2 is empty:
$ ls ../folder2
$
File numbers
looks like:
$ cat numbers
0002
0004
Now, run our command:
$ while read -r num; do mv *"$num"* ../folder2; done <numbers
Afterward, our current directory has only these files:
$ ls
Booking #0001 - PAID Booking #0003 - PAID Booking #0005 - PAID Booking #0006 - CANCELLED
Booking #0001 - PLACED Booking #0003 - PLACED Booking #0005 - PLACED Booking #0006 - PLACED
Booking #0001 - PREPAID Booking #0003 - PREPAID Booking #0005 - PREPAID numbers
And folder2 now has these files:
$ ls ../folder2
Booking #0002 - CANCELLED Booking #0002 - PLACED Booking #0004 - PAID Booking #0004 - PLACED Booking #0004 - PREPAID
John, thank you very much, I'm going to test it immediately!
– Mikhail
Apr 15 at 17:47
Sorry if my questions look too stupid, but I need to ask them to make sure I do everything correct: 1). My folder2 is located here: Macintosh HD ▸ Users ▸ Mikhail ▸ Documents ▸ Folder2 Would it be correct to indicate path to folder2 like this: /Users/Mikhail/Documents/Folder2 2). $ ls and $ ls ../folder2 $ are these commands to run? 3). where should I place numbers file? should it be .txt file?
– Mikhail
Apr 15 at 17:59
The$
is supposed to represent the prompt on the command line. Don't type it. The commandls
shows the list of file. For example, to see if your path is correct, runls /Users/Mikhail/Documents/Folder2
and see if the correct files show up in the output. Put the numbers file in FolderA and you should be in FolderA when you start the commands.
– John1024
Apr 15 at 18:06
ls /Users/MikhailMaletkin/Documents/Folder1 works perfectly it shows list of all files! I'm on the right way!
– Mikhail
Apr 15 at 18:16
1
Got it! Thanks for trying to help me. I was deeply touched with your readiness to help and your patience in teaching me all the basics.
– Mikhail
Apr 15 at 21:31
|
show 33 more comments
If the numbers are one-per-line in file numbers
, try:
while read -r num; do mv *"$num"* /path/to/folder2; done <numbers
Example
Let's start in a directory with these files:
$ ls
Booking #0001 - PAID Booking #0002 - PLACED Booking #0004 - PAID Booking #0005 - PLACED numbers
Booking #0001 - PLACED Booking #0003 - PAID Booking #0004 - PLACED Booking #0005 - PREPAID
Booking #0001 - PREPAID Booking #0003 - PLACED Booking #0004 - PREPAID Booking #0006 - CANCELLED
Booking #0002 - CANCELLED Booking #0003 - PREPAID Booking #0005 - PAID Booking #0006 - PLACED
And folder2 is empty:
$ ls ../folder2
$
File numbers
looks like:
$ cat numbers
0002
0004
Now, run our command:
$ while read -r num; do mv *"$num"* ../folder2; done <numbers
Afterward, our current directory has only these files:
$ ls
Booking #0001 - PAID Booking #0003 - PAID Booking #0005 - PAID Booking #0006 - CANCELLED
Booking #0001 - PLACED Booking #0003 - PLACED Booking #0005 - PLACED Booking #0006 - PLACED
Booking #0001 - PREPAID Booking #0003 - PREPAID Booking #0005 - PREPAID numbers
And folder2 now has these files:
$ ls ../folder2
Booking #0002 - CANCELLED Booking #0002 - PLACED Booking #0004 - PAID Booking #0004 - PLACED Booking #0004 - PREPAID
John, thank you very much, I'm going to test it immediately!
– Mikhail
Apr 15 at 17:47
Sorry if my questions look too stupid, but I need to ask them to make sure I do everything correct: 1). My folder2 is located here: Macintosh HD ▸ Users ▸ Mikhail ▸ Documents ▸ Folder2 Would it be correct to indicate path to folder2 like this: /Users/Mikhail/Documents/Folder2 2). $ ls and $ ls ../folder2 $ are these commands to run? 3). where should I place numbers file? should it be .txt file?
– Mikhail
Apr 15 at 17:59
The$
is supposed to represent the prompt on the command line. Don't type it. The commandls
shows the list of file. For example, to see if your path is correct, runls /Users/Mikhail/Documents/Folder2
and see if the correct files show up in the output. Put the numbers file in FolderA and you should be in FolderA when you start the commands.
– John1024
Apr 15 at 18:06
ls /Users/MikhailMaletkin/Documents/Folder1 works perfectly it shows list of all files! I'm on the right way!
– Mikhail
Apr 15 at 18:16
1
Got it! Thanks for trying to help me. I was deeply touched with your readiness to help and your patience in teaching me all the basics.
– Mikhail
Apr 15 at 21:31
|
show 33 more comments
If the numbers are one-per-line in file numbers
, try:
while read -r num; do mv *"$num"* /path/to/folder2; done <numbers
Example
Let's start in a directory with these files:
$ ls
Booking #0001 - PAID Booking #0002 - PLACED Booking #0004 - PAID Booking #0005 - PLACED numbers
Booking #0001 - PLACED Booking #0003 - PAID Booking #0004 - PLACED Booking #0005 - PREPAID
Booking #0001 - PREPAID Booking #0003 - PLACED Booking #0004 - PREPAID Booking #0006 - CANCELLED
Booking #0002 - CANCELLED Booking #0003 - PREPAID Booking #0005 - PAID Booking #0006 - PLACED
And folder2 is empty:
$ ls ../folder2
$
File numbers
looks like:
$ cat numbers
0002
0004
Now, run our command:
$ while read -r num; do mv *"$num"* ../folder2; done <numbers
Afterward, our current directory has only these files:
$ ls
Booking #0001 - PAID Booking #0003 - PAID Booking #0005 - PAID Booking #0006 - CANCELLED
Booking #0001 - PLACED Booking #0003 - PLACED Booking #0005 - PLACED Booking #0006 - PLACED
Booking #0001 - PREPAID Booking #0003 - PREPAID Booking #0005 - PREPAID numbers
And folder2 now has these files:
$ ls ../folder2
Booking #0002 - CANCELLED Booking #0002 - PLACED Booking #0004 - PAID Booking #0004 - PLACED Booking #0004 - PREPAID
If the numbers are one-per-line in file numbers
, try:
while read -r num; do mv *"$num"* /path/to/folder2; done <numbers
Example
Let's start in a directory with these files:
$ ls
Booking #0001 - PAID Booking #0002 - PLACED Booking #0004 - PAID Booking #0005 - PLACED numbers
Booking #0001 - PLACED Booking #0003 - PAID Booking #0004 - PLACED Booking #0005 - PREPAID
Booking #0001 - PREPAID Booking #0003 - PLACED Booking #0004 - PREPAID Booking #0006 - CANCELLED
Booking #0002 - CANCELLED Booking #0003 - PREPAID Booking #0005 - PAID Booking #0006 - PLACED
And folder2 is empty:
$ ls ../folder2
$
File numbers
looks like:
$ cat numbers
0002
0004
Now, run our command:
$ while read -r num; do mv *"$num"* ../folder2; done <numbers
Afterward, our current directory has only these files:
$ ls
Booking #0001 - PAID Booking #0003 - PAID Booking #0005 - PAID Booking #0006 - CANCELLED
Booking #0001 - PLACED Booking #0003 - PLACED Booking #0005 - PLACED Booking #0006 - PLACED
Booking #0001 - PREPAID Booking #0003 - PREPAID Booking #0005 - PREPAID numbers
And folder2 now has these files:
$ ls ../folder2
Booking #0002 - CANCELLED Booking #0002 - PLACED Booking #0004 - PAID Booking #0004 - PLACED Booking #0004 - PREPAID
answered Apr 15 at 17:44
John1024John1024
10.8k28 silver badges39 bronze badges
10.8k28 silver badges39 bronze badges
John, thank you very much, I'm going to test it immediately!
– Mikhail
Apr 15 at 17:47
Sorry if my questions look too stupid, but I need to ask them to make sure I do everything correct: 1). My folder2 is located here: Macintosh HD ▸ Users ▸ Mikhail ▸ Documents ▸ Folder2 Would it be correct to indicate path to folder2 like this: /Users/Mikhail/Documents/Folder2 2). $ ls and $ ls ../folder2 $ are these commands to run? 3). where should I place numbers file? should it be .txt file?
– Mikhail
Apr 15 at 17:59
The$
is supposed to represent the prompt on the command line. Don't type it. The commandls
shows the list of file. For example, to see if your path is correct, runls /Users/Mikhail/Documents/Folder2
and see if the correct files show up in the output. Put the numbers file in FolderA and you should be in FolderA when you start the commands.
– John1024
Apr 15 at 18:06
ls /Users/MikhailMaletkin/Documents/Folder1 works perfectly it shows list of all files! I'm on the right way!
– Mikhail
Apr 15 at 18:16
1
Got it! Thanks for trying to help me. I was deeply touched with your readiness to help and your patience in teaching me all the basics.
– Mikhail
Apr 15 at 21:31
|
show 33 more comments
John, thank you very much, I'm going to test it immediately!
– Mikhail
Apr 15 at 17:47
Sorry if my questions look too stupid, but I need to ask them to make sure I do everything correct: 1). My folder2 is located here: Macintosh HD ▸ Users ▸ Mikhail ▸ Documents ▸ Folder2 Would it be correct to indicate path to folder2 like this: /Users/Mikhail/Documents/Folder2 2). $ ls and $ ls ../folder2 $ are these commands to run? 3). where should I place numbers file? should it be .txt file?
– Mikhail
Apr 15 at 17:59
The$
is supposed to represent the prompt on the command line. Don't type it. The commandls
shows the list of file. For example, to see if your path is correct, runls /Users/Mikhail/Documents/Folder2
and see if the correct files show up in the output. Put the numbers file in FolderA and you should be in FolderA when you start the commands.
– John1024
Apr 15 at 18:06
ls /Users/MikhailMaletkin/Documents/Folder1 works perfectly it shows list of all files! I'm on the right way!
– Mikhail
Apr 15 at 18:16
1
Got it! Thanks for trying to help me. I was deeply touched with your readiness to help and your patience in teaching me all the basics.
– Mikhail
Apr 15 at 21:31
John, thank you very much, I'm going to test it immediately!
– Mikhail
Apr 15 at 17:47
John, thank you very much, I'm going to test it immediately!
– Mikhail
Apr 15 at 17:47
Sorry if my questions look too stupid, but I need to ask them to make sure I do everything correct: 1). My folder2 is located here: Macintosh HD ▸ Users ▸ Mikhail ▸ Documents ▸ Folder2 Would it be correct to indicate path to folder2 like this: /Users/Mikhail/Documents/Folder2 2). $ ls and $ ls ../folder2 $ are these commands to run? 3). where should I place numbers file? should it be .txt file?
– Mikhail
Apr 15 at 17:59
Sorry if my questions look too stupid, but I need to ask them to make sure I do everything correct: 1). My folder2 is located here: Macintosh HD ▸ Users ▸ Mikhail ▸ Documents ▸ Folder2 Would it be correct to indicate path to folder2 like this: /Users/Mikhail/Documents/Folder2 2). $ ls and $ ls ../folder2 $ are these commands to run? 3). where should I place numbers file? should it be .txt file?
– Mikhail
Apr 15 at 17:59
The
$
is supposed to represent the prompt on the command line. Don't type it. The command ls
shows the list of file. For example, to see if your path is correct, run ls /Users/Mikhail/Documents/Folder2
and see if the correct files show up in the output. Put the numbers file in FolderA and you should be in FolderA when you start the commands.– John1024
Apr 15 at 18:06
The
$
is supposed to represent the prompt on the command line. Don't type it. The command ls
shows the list of file. For example, to see if your path is correct, run ls /Users/Mikhail/Documents/Folder2
and see if the correct files show up in the output. Put the numbers file in FolderA and you should be in FolderA when you start the commands.– John1024
Apr 15 at 18:06
ls /Users/MikhailMaletkin/Documents/Folder1 works perfectly it shows list of all files! I'm on the right way!
– Mikhail
Apr 15 at 18:16
ls /Users/MikhailMaletkin/Documents/Folder1 works perfectly it shows list of all files! I'm on the right way!
– Mikhail
Apr 15 at 18:16
1
1
Got it! Thanks for trying to help me. I was deeply touched with your readiness to help and your patience in teaching me all the basics.
– Mikhail
Apr 15 at 21:31
Got it! Thanks for trying to help me. I was deeply touched with your readiness to help and your patience in teaching me all the basics.
– Mikhail
Apr 15 at 21:31
|
show 33 more comments
1
In what form is the "list of booking numbers"? Is it a file with one number per line? Something else?
– John1024
Apr 15 at 17:27
2
"I'm MacOS user." <--You should post this question on unix.stackexchange.com. This site is for Ubuntu and Macs are not Ubuntu.
– John1024
Apr 15 at 17:32
list of booking number is currently in excel table format, so I can easily make it a .txt file with one number per line
– Mikhail
Apr 15 at 17:32
it needed I can make them be in a row separated by what ever symbol.
– Mikhail
Apr 15 at 17:33
I can also put "-o -iname" or any other code/text between the booking numbers
– Mikhail
Apr 15 at 17:34