Find command if filename doesn't exists in directory
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
How I want to display the folder that do not have certain file. But the concern is, the file is same name but different cases.
Case study:
In tools directory, there are subdirectories that contain readme/README file and some of them does not have. For example
/toola/readme
/toolb/README
/toolc/ (does not have readme file)
I want find command to display only toolc folder by using this command.
find . -maxdepth 2 ! -name 'readme' -o ! -name 'README' | awk -F "/" 'print $$2' | uniq
But it doesn't work. It display all file since toola doesn't have 'README' and toolb doesn't have 'readme'
find
New contributor
add a comment |Â
up vote
0
down vote
favorite
How I want to display the folder that do not have certain file. But the concern is, the file is same name but different cases.
Case study:
In tools directory, there are subdirectories that contain readme/README file and some of them does not have. For example
/toola/readme
/toolb/README
/toolc/ (does not have readme file)
I want find command to display only toolc folder by using this command.
find . -maxdepth 2 ! -name 'readme' -o ! -name 'README' | awk -F "/" 'print $$2' | uniq
But it doesn't work. It display all file since toola doesn't have 'README' and toolb doesn't have 'readme'
find
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
How I want to display the folder that do not have certain file. But the concern is, the file is same name but different cases.
Case study:
In tools directory, there are subdirectories that contain readme/README file and some of them does not have. For example
/toola/readme
/toolb/README
/toolc/ (does not have readme file)
I want find command to display only toolc folder by using this command.
find . -maxdepth 2 ! -name 'readme' -o ! -name 'README' | awk -F "/" 'print $$2' | uniq
But it doesn't work. It display all file since toola doesn't have 'README' and toolb doesn't have 'readme'
find
New contributor
How I want to display the folder that do not have certain file. But the concern is, the file is same name but different cases.
Case study:
In tools directory, there are subdirectories that contain readme/README file and some of them does not have. For example
/toola/readme
/toolb/README
/toolc/ (does not have readme file)
I want find command to display only toolc folder by using this command.
find . -maxdepth 2 ! -name 'readme' -o ! -name 'README' | awk -F "/" 'print $$2' | uniq
But it doesn't work. It display all file since toola doesn't have 'README' and toolb doesn't have 'readme'
find
find
New contributor
New contributor
New contributor
asked 3 mins ago
nurul naiemah
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
nurul naiemah is a new contributor. Be nice, and check out our Code of Conduct.
nurul naiemah is a new contributor. Be nice, and check out our Code of Conduct.
nurul naiemah is a new contributor. Be nice, and check out our Code of Conduct.
nurul naiemah is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f477412%2ffind-command-if-filename-doesnt-exists-in-directory%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password