Linux ls command and listing contents of folders

The Linux ls command is one of the first basic commands that a Linux user should be aware of when it comes to working in the command line. There is just knowing how to change the current working path, know what the current working path is, and also listing what is in a given path. So when it comes to listing what is in a given folder that is where the Linux ls command will come into play.

There is much more to the Linux ls command beyond just listing what folders and files are in a given path location. There is listing hidden folders and files, and not doing so, there is listing file access permissions for a file, and there is not doing so. So there is not just typing the Linux ls command in and that is that, there are a few options that one should know about when it comes to Linux ls.

Also there is of course the limits of the Linux ls command, it is not like Linux ls is the only option when it comes to getting lists of files in one or more paths. There are other commands such as the Linux find method, and also using Linux ls with other commands such as cat and grep to do a better job of finding what one might be looking for in a file system. SO lets get stared with the basics, and not so basics when it comes to using the Linux ls command.

Read More

Linux kill command

The Linux kill command can be used to kill a process by sending a process kill signal to a process way of a process id. There are a few different kill signals but the default signal of the kill command will work okay for most situations so just a process id is needed with the kill command often.

In addition there are other commands such as killall that can be used to kill all processes by a command name rather than a process id. In any case in order to kill a command I first need to find out what processes are currently running on the computer so there are a few other commands that should at least be touched on briefly such as the Linux ps command that can be used to get a list of processes.

Read More

Linux pipe redirection of standard output

A Linux pipe is a form of redirection of standard output of one command into the standard input of another command. This process can then be used in a kind of chain actually, which can result in a kind of pipe where once command creates some kind of raw form of data that then gets passed into another the preforms some kind of first action on this raw data, and then so one with the next command and so forth as many times as needed. So then piping allows for breaking something down into a bunch of steps where one program does just one thing and then the output of that command is then passed on to another command that accepts that result as input to which it then uses to preform yet another result.

There is also Linux redirection that is similar to a Linux pipe, but works a little differently. With Linux pipes two commands can run in parallel with each other, and data is transferred in a per buffer basis. With Linux redirection one command must complete, before the next can start.

Read More

Linux tee command and redirecting output to more than one command and file.

The Linux tee command can be used to redirect the standard output of one command to one or more files and or commands. So if I am ever in a situation in which I want to split the standard out put of a command and then do more that one thing with that output in a single line then the Linux tee command is my friend when it comes to this.

In this post I will be going over several examples of the Linux tee command combined with both pupping and redirection of standard out pout two many files at once in one command line.

Read More