file commands

Upgrading Ubuntu to Use the Latest Git Version

command line

Problem: Ubuntu Won’t Upgrade to the Latest Git Version I was running script that clone some git archives from GitHub and I got the following error: But when I tried to upgrade git, Ubuntu told me I already had the latest version: But I didn’t actually have the latest version. Solution: Add the Software Source [...]

Read the full article →

Tar Errors: Ignoring unknown extended header keyword

backups

Problem: Unknown Tar Extraction Warnings/Errors I was running a script on Ubuntu Linux that extracted a tar archive, and I noticed many of the following errors whizzing by my console: I was concerned that the the extraction might not be working properly and that I might run into unexpected errors. Explanation: Mac OS X Issue [...]

Read the full article →

Setting Ubunutu 10.04 Raid with Dell PowerEdge T310 and PERC S100

file commands

It turns out that Dell PowerEdge servers (like the T310) with PERC S100 do not support RAID on Ubuntu. Bummer. But here is how I got Ubunutu software RAID 1 to work with my Dell PowerEdge T310, PERC S100 and Ubuntu 10.04 LTS… The main trick was to turn re-initialize the PERC Controller to use [...]

Read the full article →

How to keep the existing file attributes (owner, timestamp, etc) when copying files or directories

command line

When copying files and especially directories, sometimes you want to keep the existing file attributes. For example, you may likely want to keep the same owner, group, timestamp, etc. You can keep the attributes by using the preserve argument. preserve=all will keep everything: You can use the -p version of preserve to keep the default [...]

Read the full article →

How to rename a file or directory

command line

There is no rename function in Ubuntu Linux. Instead, you simply move the file, giving it a new name. If you don’t actually mv it to another directory, then you have effectively renamed it: If you are trying to rename a directory, you need to use the -r recursive flag:

Read the full article →

How to move or copy a directory

command line

I was trying to copy a directory, and I kept getting a cryptic error: cp: omitting directory `/var/log’ The copy (cp) command only works for files. To copy a directory, you need to use the -r recursive flag: In this case, I was trying to copy the log directory to make a quick and dirty [...]

Read the full article →

Newbie: how to edit a file from the command line

file commands

Could there be any more basic question? We all know there are no stupid questions, but I sure felt dumb having to look up this one. I found the built in editor nano. Likely more searching will yield a better editor. But for now nano will work. For other newbies, note that you need to [...]

Read the full article →