How would I do this?
Copy this ALPM_DB_VERSION. from /mnt/sdb1/var/lib/pacman/local/ALPM_DB_VERSION to /mnt/sdb2/build/001-core/var/lib/pacman/local.
And this?
Delete this when done ALPM_DB_VERSION from /mnt/sdb2/build/001-core/var/lib/pacman/local/ALPM_DB_VERSION.
And this?
Delete this when done /var/cache/pacman/pkg/*.pkg.tar.xz
I have never done this before I have use MC to do all of my copy delete and move.
I'm trying to building a script but not sure how to do it. So what would the command line look like?
How to make a copy and delete command line.
Moderator: M. Eerie
-
- Contributor
- Posts: 1955
- Joined: 09 Aug 2013, 14:25
- Distribution: Nemesis Cinnamon 64
- Location: USA
How to make a copy and delete command line.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.
- Ed_P
- Contributor
- Posts: 8909
- Joined: 06 Feb 2013, 22:12
- Distribution: Cinnamon 5.01 ISO
- Location: Western NY, USA
Re: How to make a copy and delete command line.
copyanddelete.sh
Something like this what you're looking for Jack?
Save it in your /home/guest folder then in terminal mode make it executable with:
chmod +x copyanddelete.sh
then you can run it with ./copyanddelete.sh
Needless to say you can change the copyanddelete name to whatever is more meaningful to you.
Code: Select all
#!/bin/sh
cp /mnt/sdb1/var/lib/pacman/local/ALPM_DB_VERSION /mnt/sdb2/build/001-core/var/lib/pacman/local/
echo
echo Press Enter when ready to delete the files.
read
rm /mnt/sdb2/build/001-core/var/lib/pacman/local/ALPM_DB_VERSION
rm /var/cache/pacman/pkg/*.pkg.tar.xz
Save it in your /home/guest folder then in terminal mode make it executable with:
chmod +x copyanddelete.sh
then you can run it with ./copyanddelete.sh
Needless to say you can change the copyanddelete name to whatever is more meaningful to you.
-
- Contributor
- Posts: 1955
- Joined: 09 Aug 2013, 14:25
- Distribution: Nemesis Cinnamon 64
- Location: USA
Re: How to make a copy and delete command line.
Thanks ED_P that what I was looking for. When I get done I will post what I'm doing with it.
I just like Slackware because I think it teach you about Linux to build packages where Ubuntu is like Windows you just install programs you want.