How do I find a .txt file that is in Documents by using the terminal?

Asked by siriusE

How do I find a .txt file that is in Documents by using the terminal?

I have had no luck using the find / " hello.txt" -print

I know it is there, but I need to practice pulling up files by the terminal through /paths.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
Sam_
Solved:
Last query:
Last reply:
Revision history for this message
v.miheer (v-miheer) said :
#1

If you know exact name:
$find / -name "hello.txt"

If you are not confident about case:
$find / -iname "hello.txt"

Avoid searching in "/" as it'll search whole file system. Search "/home/" instead.

Revision history for this message
siriusE (erniesanchezjr) said :
#2

Thanks, but I keep getting permission denied over and over on this search plus with my lab assignment with typing in the correct path to the file I also get the same thing "permission denied". Please help.

Revision history for this message
Chris (fabricator4) said :
#3

Use

fine ~/ -iname "hello.txt"

Which will stay within your home folder where you should have no problems with permissions.

What is the path to file where you are having permissions problems?

type

ls -l fullpathtothefile

and show us command and the output sent to the screen.

Chris

Revision history for this message
Best Sam_ (and-sam) said :
#4
Revision history for this message
siriusE (erniesanchezjr) said :
#5

Thanks Sam_, that solved my question.