Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

linux

How do I recursively grep all directories and subdirectories?

August 27, 2022 by Tarik

grep -r “texthere” . The first parameter represents the regular expression to search for, while the second one represents the directory that should be searched. In this case, . means the current directory. Note: This works for GNU grep, and on some platforms like Solaris you must specifically use GNU grep as opposed to legacy … Read more

Categories linux Tags grep, linux, unix Leave a comment

How do I delete an exported environment variable?

August 27, 2022 by Tarik

unset is the command you’re looking for. unset GNUPLOT_DRIVER_DIR

Categories linux Tags environment-variables, linux, unset Leave a comment

How can I symlink a file in Linux? [closed]

August 27, 2022 by Tarik

To create a new symlink (will fail if symlink exists already): ln -s /path/to/file /path/to/symlink To create or update a symlink: ln -sf /path/to/file /path/to/symlink

Categories linux Tags linux, symlink Leave a comment

How do I change permissions for a folder and its subfolders/files?

August 27, 2022 by Tarik

The other answers are correct, in that chmod -R 755 will set these permissions to all files and subfolders in the tree. But why on earth would you want to? It might make sense for the directories, but why set the execute bit on all the files? I suspect what you really want to do … Read more

Categories linux Tags chmod, directory, linux, permissions Leave a comment

How to change the output color of echo in Linux

August 25, 2022 by Tarik

You can use these ANSI escape codes: Black 0;30 Dark Gray 1;30 Red 0;31 Light Red 1;31 Green 0;32 Light Green 1;32 Brown/Orange 0;33 Yellow 1;33 Blue 0;34 Light Blue 1;34 Purple 0;35 Light Purple 1;35 Cyan 0;36 Light Cyan 1;36 Light Gray 0;37 White 1;37 And then use them like this in your script: … Read more

Categories linux Tags bash, command-line, echo, linux, terminal-color Leave a comment

How can I recursively find all files in current and subfolders based on wildcard matching?

August 25, 2022 by Tarik

Use find: find . -name “foo*” find needs a starting point, so the . (dot) points to the current directory.

Categories linux Tags linux, shell Leave a comment
Newer posts
← Previous Page1 … Page250 Page251

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa