Use find to select some directory

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I wish to use find (or ls) in a script to select some directory (maybe several directories actually) according to some variable I give.



So for ex :



/usr/local/bin/script tad*


would give me a list of all the directories beginning with "tad" in repository /var/db.



Not



/var/db/tadam
/var/db/tadadada
/var/db/taddeus


but



tadam
tadadada
taddeus


Thanks for help.










share|improve this question





















  • How does your script script look like? What is your final goal? Are you interested in only directories or files too?
    – Valentin Bajrami
    3 mins ago















up vote
0
down vote

favorite












I wish to use find (or ls) in a script to select some directory (maybe several directories actually) according to some variable I give.



So for ex :



/usr/local/bin/script tad*


would give me a list of all the directories beginning with "tad" in repository /var/db.



Not



/var/db/tadam
/var/db/tadadada
/var/db/taddeus


but



tadam
tadadada
taddeus


Thanks for help.










share|improve this question





















  • How does your script script look like? What is your final goal? Are you interested in only directories or files too?
    – Valentin Bajrami
    3 mins ago













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I wish to use find (or ls) in a script to select some directory (maybe several directories actually) according to some variable I give.



So for ex :



/usr/local/bin/script tad*


would give me a list of all the directories beginning with "tad" in repository /var/db.



Not



/var/db/tadam
/var/db/tadadada
/var/db/taddeus


but



tadam
tadadada
taddeus


Thanks for help.










share|improve this question













I wish to use find (or ls) in a script to select some directory (maybe several directories actually) according to some variable I give.



So for ex :



/usr/local/bin/script tad*


would give me a list of all the directories beginning with "tad" in repository /var/db.



Not



/var/db/tadam
/var/db/tadadada
/var/db/taddeus


but



tadam
tadadada
taddeus


Thanks for help.







shell-script






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 17 mins ago









22decembre

71117




71117











  • How does your script script look like? What is your final goal? Are you interested in only directories or files too?
    – Valentin Bajrami
    3 mins ago

















  • How does your script script look like? What is your final goal? Are you interested in only directories or files too?
    – Valentin Bajrami
    3 mins ago
















How does your script script look like? What is your final goal? Are you interested in only directories or files too?
– Valentin Bajrami
3 mins ago





How does your script script look like? What is your final goal? Are you interested in only directories or files too?
– Valentin Bajrami
3 mins ago
















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477366%2fuse-find-to-select-some-directory%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477366%2fuse-find-to-select-some-directory%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?