How to Use AFS
AFS Directory Access Rights [pdf]
Common UNIX Commands [pdf]
Restore Files
From an FTP Client
A read-only backup is made nightly, 6pm - 4am, of your AFS content to the OldFiles directory. If you are accessing these files via an FTP client from your own machine, complete the following steps to recover a file:- Launch an SFTP program. Use the appropriate link below to download the software, if not installed.
- Enter linux.andrew.cmu.edu for the server/hostname.
- Go to the OldFiles directory.
- Transfer your files from remote to local.
From a Computer Lab
Computer labs do not have FTP clients installed on the machines, which means you'll need to restore files through terminal (Mac) or via command line (Windows).
- Enter linux.andrew.cmu.edu for the server/hostname.
- Enter fs mkm OldFiles user.andrewID.backup to mount the OldFiles directory.
- Enter cp -avr source-file|directory target-file|directory top copy files from the remote server to your local drive.
Note: Entering the following will allow you to copy an entire directory:
/afs/andrew/usr/userID/Oldfiles/foldername/foldername/foldername /afs/andrew/usr/userid/foldername/folder
Transfer Files
From an FTP Client
If you are accessing these files via an FTP client from your own machine, complete the following steps to transfer a file:- Launch the SFTP program. Use the appropriate link below to download the software, if not installed.
- Enter linux.andrew.cmu.edu for the server/hostname.
- Transfer your files from local to remote in the appropriate directory.
-
- My Documents, Desktop - files saved in a computer lab
- Private - files you don't want to share
- Public - shared files
- www - for personal web pages
Delete Files to Recover Storage
From an FTP Client
If you deplete or almost deplete your AFS quota, you may have difficulty saving files or logging on to a computer in a computer lab. To resolve this problem and recover storage space, delete AFS files.
- Access your AFS directory by logging in with your Andrew userID and password, then authenticate with DUO:
- Mac or Linux: Open Terminal and type:
ssh <Your Andrew userID>@linux.andrew.cmu.edu
- PC (Windows): Connect to or .
- Mac or Linux: Open Terminal and type:
- Type:
du -hs .[^.]* * |sort -h
Note: This command displays a list of all files in your AFS directory, including hidden files, folders, and mountpoints/volumes. The list is organized by disk usage from least to greatest. - Ignore “OldFiles.”
Note: “OldFiles” is a read-only copy of your AFS home directory nightly backup. They do not count towards your quota, so you do not have to delete them. - Identify the largest directories.
- Zip or delete files from these directories to recover storage space.
Note: Consider moving the files to Box or Google Drive instead of deleting them. - To delete all files in a folder, type:
rm -f -r ./foldername/*
Note: Repeat the command, inserting the name of each folder you want to delete, until your quota is reduced to the size you want. - Check your Desktop, Downloads, and Documents directories to see if you can archive any of those files. You can also delete folders in the /Library directory.
Note: This step will remove any preference settings you have on some applications. - The following hidden directories may also pull from your storage quota. You may clear or delete them to recover space:
- .Trash
- .ccache
- .cache
- If needed, review commonly used Unix Commands.