1

Currently i have to analize some big files looking for a espefic word in .css located on my /var/www/ located on ubuntu server (ssh). There a way to make something like Ctrl+f in windows programatically in ubuntu to search the words ?

Or just i have to use some ftp tool to download my file in windows and looking for there ?

  • You can use command line tools e.g. grep for this..please edit your question and add some content of the file and what you want to search out from that.. – heemayl May 15 '15 at 15:26
  • Try grep -n '.css' file.txt , if you want .css coming anywhere in a word..on the other hand if you want the words containing .css try grep -Pn '(?<=^)|(?<=\s).css(?=$|\s)' file.txt .....you will get the lines containg .css along with line numbers.. – heemayl May 15 '15 at 15:49

1 Answers1

2

When you are connected via ssh there are many commands you can use.

You could use grep searchString /var/www/file.css/ to display all occurrences of searchString.

Or you could display the file with less /var/www/file.css then press / and type the word you are searching for. Press enter to jump to the first occurrence of the word and n to cycle through the other ones step by step.

Pabi
  • 7,401
  • 3
  • 40
  • 49