Skip to content

Tag: bash

Colour code files based on extension in linux

I was wondering if in linux there were a way to coulor files by extension, so that, for example a .py or a .C file would have a different color. So far, all I managed to do is to change the colouring scheme in the ~/.bashrc file to distinguish directories, executables etc. but no way to colour code the files

Ansible: copying one unique file to each server in a group

I have a series of numbered files to be processed separately by each server. Each split file made using linux split and then xz compressed to save transfer time. split_001 split_002 split_003 … split_030 How can I push these files out to a group of 30 servers with ansible? It does not matter which serve…

Concatenating file names into string for a function

I’m trying to concatenate a bunch of files into a string so I can use them for a function. As a test script I’m trying to do this: but I’m getting the error: but they are most definitely there can I get some advice please? Answer Change the last line to mv $A ./stuff That should work with fi…

Bash: Determine partially deleted content [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack …

Why count differs between ls and ls -l linux command?

I had a directory with number of files and need to check the count of files present in it. I tried the following two commands: and found there are differences while using both commands. (ie. number of files is greater in the usage of second command while comparing to the first command.) I would like to know t…

How to suppress npm WARN deprecated messages in bash

I have several version of node.js installed in Linux Mint 18.0. I manage them using nvm. Because of a project dependency, I need to have version 0.10 as the default version (nvm use 0.10). As a result of this, every time I start my terminal, I get the following output: How do I suppress these messages? Answer…