Linux

How-to show all ethernet devices installed on your system

on Monday, 19 January 2009. Posted in Linux

Adding the "-a" option to the ifconfig command will show all of the ethernet devices installed on the computer:

ifconfig -a

The ifconfig command allows you to a whole lot more to configure your network interfaces, for additional options you can always check the Linux manual from the command line or you can visit the ComputerHope article on the command.

How-to view the current usage of your partitions

on Monday, 19 January 2009. Posted in Linux

I haven't had to use this one much since most of the time there is a GUI representation of this available, but it does help to find out how much hard drive space you are currently using.

df -k

How-to copy a file

on Monday, 19 January 2009. Posted in Linux

Very simple usage of the "cp" command:

# copy and preserve modification date of a file:
cp -p filename /copy/to/directory

How-to work with tar and gzipped files

on Monday, 19 January 2009. Posted in Linux

How to gzip a tar file:

gzip filename.tar

How to decompress a gzip file back to a tar file:

gunzip filename.tar.gz

How to create a .tgz file from a set of folders:

tar -czvf filename.tgz /folder/to/backup

How to decompress a .tgz file:

tar -xzvf archive.tgz

How to extract files from a compressed tarball:

# extract to same directory
tar -xzf archive.tar.gz

# extract to a specific directory
tar -xzf archive.tar.gz -C /location/to/extract/to

How to list files in tar or compressed tar file

tar -tf archive.tar
tar -tzf archive.tar.gz

How to tell which versions of tar and gzip are installed on your machine:

tar --version

gzip -v

How-to Tell Which Version of Redhat you are running

on Monday, 19 January 2009. Posted in Linux

You can type in the following at the command line to get the version of Redhat you are running:

cat /etc/redhat-release

Unfortunately, this method doesn't tell you whether you are running a 32-bit or 64-bit version of the operating system. In order to find out this information you could use the following command:

uname -a