Skip to content

list only directory if contain a specific file name in bash

Hel lo everyone, I need help with bash commands. Here is the deal : I have several directories : such as and a /path_to_this_file/file.txt : that I use such as : then I can list all content in the paths BUT I would like to do a ls only for the path2 that does not have a file2 into their

Finding linux users with a bash script

i am newbie in bash-scripting and linux. I want to write a script to get a username from the terminal and say whether that username is on the passwd or not. i wrote and tried below script but it doesn’t work. help me that what i can do. how i can define a variable to read a string from termnial.