file commands
Home file commands
How to Move or Copy a Directory
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
Setting Ubuntu 10.04 Raid with Dell PowerEdge T310 and PERC S100
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
Newbie: How to Edit a File From the Command Line
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
How to Rename a File or Directory
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
Upgrading Ubuntu to Use the Latest Git Version
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
Tar Errors: Ignoring Unknown Extended Header Keyword
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
How to Keep the Existing File Attributes (Owner, Timestamp, etc) When Copying Files or...
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