Quantcast
Channel: linux – codinghabit
Browsing all 6 articles
Browse latest View live

Linux Paste Command

Today I want to share a nifty tool that I just discovered the other day while looking for a method to combine data from two different files.  The data in the two files were related one-to-one by row....

View Article



Linux Tip: Display ‘ls’ Output In Columns

If you are redirecting the output of ls to a file, it will output a single file per line. ls my_file my_file2 other_file Use the -C option to have ls output its usual column format ls -C >...

View Article

Linux Tip: Use sed to replace characters

Sed is often used to replace words in input, but did you know that you can replace a set of characters with another set of corresponding characters? This is accomplished by use of the ‘y’ command. It’s...

View Article

Linux Tip: Multiple Sed Instructions In One Command

It’s possible to run several commands in a sed one-liner. All you have to do is separate the instructions with a semicolon: echo '123456' | sed 's/1/a/g; s/a2/x/g' output: x3456 The post Linux Tip:...

View Article

Linux Tip: ls with inode number

The common ‘ls’ command will allow you to display the inode numbers associated with each file in the directory. All that’s needed is supplying the ‘-i’ option. > ls -i 26610614 file1.txt 26610615...

View Article


Linux Tip: grep for multiple words

Quick linux tip for grepping for multiple words at the same time. Use the -e option for each pattern that you want to match. If you wanted to search for all files containing either *html* or *script*:...

View Article
Browsing all 6 articles
Browse latest View live




Latest Images